[jboss-user] [EJB 3.0] - Tryed searching for this issue, but haven't found anything.

orclev do-not-reply at jboss.com
Mon Jul 24 00:27:06 EDT 2006


Ok, I've got a entity bean with a property annotated like so:
@JoinColumn(name="background", nullable=false)
@ManyToOne(cascade={CascadeType.PERSIST}, fetch=FetchType.EAGER)
@LazyToOne(LazyToOneOption.FALSE)
public Background getBackground() {
	return background;
}

Which if I'm reading everything properly should cause the Background object to be initialized when the entity bean is loaded from the DB, however I keep getting a LazyInitiaalizationException when I attempt to access that method saying that the owning session was closed.
Why is it trying to load the background lazily when I specificly listed it as non-lazy and eager?


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

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



More information about the jboss-user mailing list