[jboss-user] [JBoss Seam] - Re: asynchasynchronous transactions problem

Stateless Bean do-not-reply at jboss.com
Wed May 2 10:57:50 EDT 2007


  | @Entity
  | @Name("Person")
  | @Scope(ScopeType.CONVERSATION)
  | 	@Role(name="currentPerson", scope=ScopeType.PAGE)
  | @Table(name="Person")
  | public class Person implements Serializable {
  | 	private static final long serialVersionUID = -3067249951570023008L;
  | 	public Person() {}
  | 
  | 	private Long id;               
  | 	private String username; 
  | 
  |     private List<Planet> planetList = new LinkedList<Planet>(); 
  | 
  | 	@OrderBy("idPlanet ASC")
  | 	@OneToMany(mappedBy="planetOwner", fetch=FetchType.LAZY, cascade=CascadeType.ALL)
  | 	public List<Planet> getPlanetList() { 
  | 		if(planetList == null)
  | 			planetList = new LinkedList<Planet>();
  | 		return planetList;
  | 	}
  | 	public void setPlanetList(List<Planet> planetList) { this.planetList = planetList;}
  | 

planet


  | Entity
  | @Name("Planet")
  | @Scope(ScopeType.CONVERSATION)
  | 	@Role(name="currentPlanet", scope=ScopeType.PAGE)
  | @Table(name="Planet")
  | public class Planet implements Serializable{
  | 	private static final long serialVersionUID = -8781210700646546267L;
  | 	public Planet() {}
  | 
  |     private Long idPlanet;        
  |     private String Name;              
  |     private Person planetOwner;  
  | 
  | 	@ManyToOne
  | 	@JoinColumn(name="person_id")
  | 	public Person getPlanetOwner() { return planetOwner; }
  | 	public void setPlanetOwner(Person planetOwner) { this.planetOwner = planetOwner; }  
  | 

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

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



More information about the jboss-user mailing list