"mortena" wrote : Create a new Person with a default address in one form.
  | Add new addresses to an existing Person.
  | 
  | How do I do that?

You probably want to extend the createInstance() method of PersonHome generated 
by seam-gen to add the default address to the person.

@Override
  | protected Person createInstance() {
  |    Person person = new Person();
  |    Address address = // lookup default address
  |    person.getAddresses().add(address);             
  |    return person;
  | }

Though I would normally make address an embedded entity.

anonymous wrote : Can seam-gen handle relationships between entities?

Yes

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

Reply to the post : 
http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4099823
_______________________________________________
jboss-user mailing list
[email protected]
https://lists.jboss.org/mailman/listinfo/jboss-user

Reply via email to