| 
					
						 Hi,
 one-to-many:
 Users.hbm.xml:
 <id name="id" column="Userid" type="java.lang.String">
             <generator class="assigned"/>
 </id>
 <property name="regtime" column="Regtime" type="java.util.Calendar" />
 <set name="bbsTopicSet"  lazy="false" cascade="all" inverse="true">
             <key column="Creator"/>
             <one-to-many class="BbsTopic"/>
 
 bbsTopicSet.hbm.xml:
 <many-to-one name="Users" column="Creator" class="SysUsers"  update="true" insert="true"/>
 
 bbstopic.getSysUsers().getId() will be ok,but if bbstopic.getSysUsers().getRegtime(),it can not work:
 org.hibernate.LazyInitializationException: could not initialize proxy - the owning Session was closed
 
 why? 
					
  
						
					 |