Joined: Thu Apr 14, 2005 6:26 pm Posts: 4
|
I am pulling an object from the db to display in a form on the view tier. If the user modifes the data and hits save I need to do some processing of the data before persisting it. This processing involves reattaching some lazy loaded fields in the object. It seem that by reattaching the object and then trying to persist it all within the same session doesn't work. If i debug the code and look in the sesison i can see my object and the changes which were made to it but no sql ever get's sent to the database. Do I need to do my preprocessing in one session close it and then persist in another session?
I'm going to sneak one more question in here if i could. It seems that's it's possible to lazily initialize indvidual fields of an object by doing a
session.lock(persistentObj1.getPersistentObj2(),LockMode.NONE) . Is is possible to initialize a field which is a PersistentCollection in the same manner (i.e. just reattach the collection not the entrie parent object)?
Thanks!
|
|