[jboss-user] [JBoss Seam] - Re: OneToMany List refresh after insert

damianharvey do-not-reply at jboss.com
Tue May 29 03:53:19 EDT 2007


Yes. I'm working my way through the Hibernate book so I'm not 100% that this is the correct way - but it works.

You need to explicitly add the PERSON to the Collection of PERSONs in the CITY when doing the persist. I'm not in front of my normal laptop but the code looks something like this:

  | @Override
  | @Transactional
  | public String persist() {
  | String status = super.persist();
  | 
  | getInstance().getCity().getPersons().add(getInstance());
  | 
  | Contexts.removeFromAllContexts("personHome");
  | return status;
  | }
  | 



View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4049210#4049210

Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4049210



More information about the jboss-user mailing list