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"

Task #346 (new)

Opened 18 years ago

Last modified 9 years ago

Passing non-proxied one-to-manys to server can return empty (non-null) collection — at Initial Version

Reported by: jamoore Owned by: jamoore
Priority: critical Milestone: 3.0-M3
Component: Model Version: 3.0-M1
Keywords: collections, links, proxies, unloading, corruption Cc: cxallan
Resources: n.a. Referenced By: n.a.
References: n.a. Remaining Time: n.a.
Sprint: n.a.

Description

Several model objects have methods for adding items to collection-valued fields:

 * Pixels.addThumbnail(Thumbnail)
 * Project.linkDataset(Dataset)

These calls add the argument to their own collection and then call the reverse method on the arguments:

 * Thumnail.setPixels(Pixels)
 * ProjectDatasetLink.setProject(Project)

The collections are ignored by Hibernate, and only the reverse methods have an effect. This is known behavior.

However, when one uses only the reverse methods (e.g. setPixels(Pixels)) and the Pixels instance is not a proxy (e.g. pixels.isLoaded()==true) then the Pixels instance which is returned by the IUpdate.saveAndReturnObject() method is neither unloaded, nor is the collection nulled, nor does it contain the newly added Thumbnail which could easily lead to data corruption.

Change History (0)

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.67665 sec.)

We're Hiring!