[jboss-user] [EJB 3.0] - Re: CascadeType.PERSIST question
waynebaylor
do-not-reply at jboss.com
Mon Sep 10 13:35:49 EDT 2007
ok, then try something like this
PartyIsPerson p = new PartyIsPerson();
| p.setUsername("Guest"); //Guest
| p.setPassword("Guest"); //Guest
| p.setForename("Guest"); //Guest
| p.setLastname("Guest"); //Guest
|
| em.persist(p); //will assign an auto generated id
|
| PersonHasCustomization phc = new PersonHasCustomization();
|
| phc.setPartyidperson(p.getPartyId());
|
| phc.setLocale("DE_de");
| p.setCustomization(phc);
|
| em.merge(p);
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4082722#4082722
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4082722
More information about the jboss-user
mailing list