Bug #168 (closed)
Plane info linkage problems
Reported by: | cxallan | Owned by: | cxallan |
---|---|---|---|
Priority: | minor | Cc: | bwzloranger |
Sprint: | n.a. | ||
Total Remaining Time: | n.a. |
Description
Currently, the linkage between PlaneInfo? and Pixels is not preserved (the PlaneInfo? objects are totally orphaned and not saved) when using the following:
PlaneInfo planeInfo = new PlaneInfo(); planeInfo.setPixels(pixels); iUpdate.save(pixels);
It is preserved when using this however:
PlaneInfo planeInfo = new PlaneInfo(); pixels.addToPlaneInfo(planeInfo); iUpdate.save(pixels);
As far as I can recall from previous discussions with Josh on similar problems, this has to do with the sort of explicit "double-linking" that needs to take place with the objects to preserve linkages when traversing up or down the graph. Is this "double-linking" supposed to happen here or is it simply a case of using the API properly?
Change History (4)
comment:1 Changed 18 years ago by cxallan
- Cc brain added
comment:2 Changed 18 years ago by jmoore
- Owner changed from jmoore to callan
comment:3 Changed 17 years ago by jmoore
- Keywords set to iteration1
- Milestone changed from Unscheduled to 3.0-Beta3
- Resolution set to fixed
- Status changed from new to closed
This has been settled. Closing.
comment:4 Changed 17 years ago by jmoore
- Milestone changed from 3.0-Beta3 to 3.0-Beta2.2
The double-linking currently only happens on the addToXYZ method calls. Conceivably, we could add that logic to the setABC methods as well, but it entails a search through the existing collection, forcing us to be careful because of the tempermental equals logic on the client-side (possibly fixed by #54)
The broken, first example given above :
can be easily fixed, though, by saving the PlaneInfo instance rather than the Pixels:
r722 provides some examples. See TicketsUpTo199Test.
Passing this back to you for a recommendation on what needs to be fixed for the API consumer. Perhaps just becomes a documentation bug.