Hello, I'm having a problem with Appfuse, I have 2 class, Movil (Bus) and
Asiento(Seat), the movil has a list of asientos.
Here it's the method get:
@OneToMany(targetEntity=com.mycompany.app.model.Asiento.class ,
fetch=FetchType.LAZY,cascade=CascadeType.ALL)
@JoinColumn(name="mov_codigo")
public List<Asiento> getAsientos() {
return asientos;
}
The test was succeded, but when i run since web ( using struts ), i have the
following exception.
ERROR [btpool0-2] LazyInitializationException.<init>(19) | failed to lazily
initialize a collection of role: com.mycompany.app.model.Movil.asientos, no
session or session was closed
org.hibernate.LazyInitializationException: failed to lazily initialize a
collection of role: com.mycompany.app.model.Movil.asientos, no session or
session was closed
Where's the mistake?
Thank.
Regards.
Mauri