If I am put my 5 cents (inflation). My personal default is (PERSIST, MERGE,
REFRESH) and in the circumstance that I need to put a DELETE then I would if
necessary. I assume beginner Seam developers would absolutely freak if they
saw a detached entity exceptions when they first use Seam's reveng.
On Wed, Mar 4, 2009 at 10:54 AM, Dan Allen <dan.j.allen(a)gmail.com> wrote:
On Tue, Mar 3, 2009 at 8:10 AM, Emmanuel Bernard <emmanuel(a)hibernate.org>wrote:
>
> On Feb 28, 2009, at 08:08, Max Rydahl Andersen wrote:
>
>
>> 2) What default do you think we should use for reveng, ALL or NONE (or
>> something else ?)
>>
>
> none
What about PERSIST? I really like to be able to do this.
Child c1 = new Child();
Child c2 = new Child();
Parent p = new Parent();
p.addChild(c1);
p.addChild(c2);
em.persist(p);
With none, you have to go through and do persists all over the place...and
in a real application, that top level object typically has 10+
relationships, esp if lookup tables are used.
-Dan
--
Dan Allen
Senior Software Engineer, Red Hat | Author of Seam in Action
http://mojavelinux.com
http://mojavelinux.com/seaminaction
NOTE: While I make a strong effort to keep up with my email on a daily
basis, personal or other work matters can sometimes keep me away
from my email. If you contact me, but don't hear back for more than a week,
it is very likely that I am excessively backlogged or the message was
caught in the spam filters. Please don't hesitate to resend a message if
you feel that it did not reach my attention.
_______________________________________________
seam-dev mailing list
seam-dev(a)lists.jboss.org
https://lists.jboss.org/mailman/listinfo/seam-dev
--
Daniel Hinojosa
Programmer, Instructor, and Consultant
2529 Wisconsin St. NE
Albuquerque, NM 87110
dhinojosa(a)evolutionnext.com
http://www.evolutionnext.com
http://www.abqjug.org
(505) 363-5832