Read the rules before posting!
http://www.hibernate.org/ForumMailingli ... AskForHelp
Hibernate version:
3.0
Mapping documents:
<class name="Function" table="Function" >
<id name="id" type="int" column="id">
<generator class="sequence">
<param name="sequence">Function_Id_seq</param>
</generator>
</id>
<property name="type" type="string" >
<column name="funType" length="20" not-null="true" />
</property>
<property name="stub" type="text" lazy="true">
<column name="stub" />
</property>
</class>
Code between sessionFactory.openSession() and session.close():
Query q = session.createQuery("from Function");
FunctionHB function=(PDFunctionHB)q.setMaxResults(1).uniqueResult();
System.out.println(Hibernate.isPropertyInitializedfunction,"stub"));
The result is true (but should be false). Where is my mistake? Can anybody help me?
Column "stub" is clob. I not want always read stub field(this field is big). I want read clob from DB only when function.getStub() was called. I am right that I us lazy property or not?