Warning: Can't synchronize with repository "(default)" (/home/git/ome.git does not appear to be a Git repository.). Look in the Trac log for more information.
Notice: In order to edit this ticket you need to be either: a Product Owner, The owner or the reporter of the ticket, or, in case of a Task not yet assigned, a team_member"

Bug #168 (closed)

Opened 18 years ago

Closed 17 years ago

Last modified 17 years ago

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

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 :

PlaneInfo planeInfo = new PlaneInfo();
planeInfo.setPixels(pixels);
iUpdate.save(pixels);

can be easily fixed, though, by saving the PlaneInfo instance rather than the Pixels:

  Pixels pixels = ObjectFactory.createPixelGraph(null);
  PlaneInfo planeInfo = createPlaneInfo();
  planeInfo.setPixels(pixels);
  planeInfo = (PlaneInfo) iUpdate.saveAndReturnObject(planeInfo);

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.

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
Note: See TracTickets for help on using tickets. You may also have a look at Agilo extensions to the ticket.

1.3.13-PRO © 2008-2011 Agilo Software all rights reserved (this page was served in: 0.65032 sec.)

We're Hiring!