[PJUG Javamail] How do you Update DETACHED Value object ?
Umesh Gohil
gohilumesh at hotmail.com
Wed Sep 30 14:14:23 EDT 2009
Hi All,
I am trying to update detached object. Some fields value changed to
null in value object by user. Now those fields whose value changed to
null is totally ignored by JPA .
Solution to this problem is I am creating temp Value Object by setting
primary key and calling super.get on temp value object in transaction
and then set all the fields of new VO object then only those fields
value will be changed in database.
Few thing I have to take care of like
1> Concurreny Exception
2> Some fields value is set by framework like createdt, updatedt, createUserid, updateUserId
Please suggest best alternative
@Umesh
_________________________________________________________________
Bing™ brings you maps, menus, and reviews organized in one place. Try it now.
http://www.bing.com/search?q=restaurants&form=MLOGEN&publ=WLHMTAG&crea=TEXT_MLOGEN_Core_tagline_local_1x1
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://www.pjug.org/pipermail/javamail/attachments/20090930/2f8c2387/attachment.html
More information about the Javamail
mailing list