attach/detach
Anthony Berglas <[email protected]>
| Newsgroups | gmane.comp.java.orm.simpleorm |
|---|---|
| Message-ID | <[email protected]> |
Hello Franck To keep it simple, the semantics of attaching a data set to a session could be exactly the same as attaching each record in it, one by one. As each record is moved to the session then it is removed from the data set. If there are any conflicts (duplicate records) then the process stops with an exception. Any conflicts are left to the user to merge data by catching the exception -- this should be a rare requirement. Should attaching/unattaching records recursively process their parents, as is currently done? It is no longer so useful because parents can be automatically reconnected to their children if both are in the same dataset; and not doing it is simpler. Anthony At 05:50 PM 3/07/2008, Franck Routier wrote: >Hi, > >ok, I really >like >SSession.newSessionAndAssociateWithCurrentThreadAndOpenJdbcConnection(), >which really says what it does..... :) > >I agree with the fact that a dataset must be a whole transaction cache, >and that a session can only operate on one dataset at a time >(begin/commit). And a record is either detached (from any dataset) or >bound to one datset only. This makes sense to me, and doing otherwise is >too far from what we've done until now. Would be scary :) > >The point I have trouble with is attach / detach semantics. What do you >think it should be ? > >- only detach datset / or detach one record ? >- only attach dataset / attach one record ? >- if you are in an ongoing transaction, attaching a dataset mean merging >the dataset, no only moving pointer... (I think of the updateList in >particular) > >What do you think ? > > > Dr Anthony Berglas, [email protected] Mobile: +61 4 4838 8874 Just because it is possible to push twigs along the ground with ones nose does not necessarily mean that is the best way to collect firewood. ------------------------------------ Yahoo! Groups Links <*> To visit your group on the web, go to: http://groups.yahoo.com/group/SimpleORM/ <*> Your email settings: Individual Email | Traditional <*> To change settings online go to: http://groups.yahoo.com/group/SimpleORM/join (Yahoo! ID required) <*> To change settings via email: mailto:[email protected] mailto:[email protected] <*> To unsubscribe from this group, send an email to: [email protected] <*> Your use of Yahoo! Groups is subject to: http://docs.yahoo.com/info/terms/