Need help with Hibernate? Read this first:
http://www.hibernate.org/ForumMailingli ... AskForHelp
Hibernate version: 3.3.1
Mapping documents:
<hibernate-mapping>
<class name="model.PadmOrgano" table="PADM_ORGANOS">
<id name="idOrgano"
type="long">
<column name="ID_ORGANO"/>
</id>
<set name="pdatRegistrosPads"
table="PREL_REGISTROS_ORGANOS" lazy="false" >
<key column="ID_ORGANO"/>
<many-to-many class="model.PdatRegistro" column="ID_REGISTRO"
lazy="false"/>
</set>
</class>
</hibernate-mapping>
----- ------
<hibernate-mapping>
<class name="model.PdatRegistro" table="PDAT_REGISTROS">
<id name="idRegistro"
type="long">
<column name="ID_REGISTRO"/>
</id>
<set name="padmOrganosPdas" inverse="true" table="PREL_REGISTROS_ORGANOS" lazy="false">
<key column="ID_REGISTRO"/>
<many-to-many class="model.PadmOrgano" column="ID_ORGANO"
lazy="false"/>
</set>
</class>
Code between sessionFactory.openSession() and session.close():
making a "get" operation
Full stack trace of any exception that occurs:
LazyInitializationError
Name and version of the database you are using: Oracle 11
The generated SQL (show_sql=true):
Debug level Hibernate log excerpt:
Problems with Session and transaction handling?
Read this:
http://hibernate.org/42.html
I´m developing a web application with spring and hibernate 3.3.1. I have a bidirectional many-to-many association, lazy = false. I make mappings you can see above, but I have LazyInitializationError. I have done a lot of test but ever the same result. I have read in the reference and in the book hibernate in action but I can't reach a solution.
I would appreciate any help, thanks in advance
Rodolfo