| 
					
						 When i developing with Hibernate2.x,i must manually add lazy=true in hbm.xml,for example:
 
 <class ....... lazy="true">
 </class>
 
 There are 2 classes C and P and the relation between C and P is many-to-one.
 
 hql is "from C".
 
 when lazy="false",the original sqls presented in console are:
 select c.id,c.name from c
 select p.id,p.name from p where p.id=?
 
 when lazy="true" sql is:
 select c.id,c.name from c
 
 But in Hibernate3.x,i don't need add lazy=true in hbm.xml,because it is the default behaviour,but it seems not useful.
 
 whether lazy is true or false,the sqls always are:
 select c.id,c.name from c
 select p.id,p.name from p where p.id=?
 
 why?Can anybody tell me the cause? 
					
  
						
					 |