-->
These old forums are deprecated now and set to read-only. We are waiting for you on our new forums!
More modern, Discourse-based and with GitHub/Google/Twitter authentication built-in.

All times are UTC - 5 hours [ DST ]



Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 1 post ] 
Author Message
 Post subject: why this set doesnot initialized
PostPosted: Fri Apr 30, 2004 7:58 am 
Newbie

Joined: Thu Apr 29, 2004 11:15 pm
Posts: 8
i have a set in sysuser table mapping files.

<set name="usertofunc" table="USERTOFUNC" lazy="true" inverse="true" outer-join="true">
<key column="EMPSEQNO"/>



<composite-element class="com.capinfo.ems.login.dao.hibernate.Usertofunc">
<many-to-one name="sysmenu" class="com.capinfo.ems.login.dao.hibernate.Sysmenu" column="FUNCID" outer-join="auto"/>

<property column="SDATE" length="7" name="sdate" type="java.util.Date"/>
<property column="EDATE" length="7" name="edate" type="java.util.Date"/>
</composite-element>

</set>

it goes well but when i query the data
select elements(sysuser.usertofunc) from .Sysuser sysuser where sysuser.empname=:empname

the code is:
List list=sdi.getFuncByName(sysuserbyid.getEmpname());
Iterator iter=list.iterator();
while(iter.hasNext()) {
Usertofunc uf=(Usertofunc) iter.next();
System.out.println(uf.getFuncid());
}
it is no exception but can not get the data

19:40:52,702 DEBUG Printer:75 - listing entities:

19:40:52,712 DEBUG Printer:82 - com.capinfo.ems.login.dao.hibernate.Sysmenu{memo=null, funcid=B120, funcname=修改立项申请}

19:40:52,712 DEBUG Printer:82 - com.capinfo.ems.login.dao.hibernate.Sysuser{usertofunc=[Usertofunc{sysmenu=Sysmenu#B120, edate=null, sdate=null}], pubickey=0, memo=null, validtag=null, userstate=0, lossdate=null, empname=test, avlsdate=01 四月 2004 00:00:00, empid=1, empseqno=1, avledate=null, pwd=1}

19:40:52,712 DEBUG Printer:82 - com.capinfo.ems.login.dao.hibernate.Sysmenu{memo=null, funcid=B430, funcname=投标结果记录}

19:40:52,722 DEBUG Printer:82 - com.capinfo.ems.login.dao.hibernate.Sysmenu{memo=null, funcid=B520, funcname=项目周报查询}

19:40:52,722 DEBUG Printer:82 - com.capinfo.ems.login.dao.hibernate.Sysmenu{memo=null, funcid=B130, funcname=立项申请审批}

19:40:52,722 DEBUG Printer:82 - com.capinfo.ems.login.dao.hibernate.Sysmenu{memo=null, funcid=B210, funcname=销售项目周报}

19:40:52,732 DEBUG SessionImpl:2323 - executing flush

19:40:52,732 DEBUG SessionImpl:2790 - post flush

null

null

null

null

null

[com.capinfo.ems.login.dao.hibernate.Usertofunc@3257b8[empseqno=0,funcid=<null>], com.capinfo.ems.login.dao.hibernate.Usertofunc@11d2572[empseqno=0,funcid=<null>], com.capinfo.ems.login.dao.hibernate.Usertofunc@859a68[empseqno=0,funcid=<null>], com.capinfo.ems.login.dao.hibernate.Usertofunc@15c62bc[empseqno=0,funcid=<null>], com.capinfo.ems.login.dao.hibernate.Usertofunc@5660d6[empseqno=0,funcid=<null>]]


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 1 post ] 

All times are UTC - 5 hours [ DST ]


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
© Copyright 2014, Red Hat Inc. All rights reserved. JBoss and Hibernate are registered trademarks and servicemarks of Red Hat, Inc.