ibatis-user-java mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Haulyn R. Jason" <saharab...@gmail.com>
Subject IBatis 2.3 lazy loading issue for return null instead of an list
Date Tue, 12 Aug 2008 04:03:21 GMT
I use the feature Lazy loading for IBatis2.3, I have a domain class like:
public class Role(){
private String id;
private String name ;
private List<Privilege> privilegeList ;

the problem is:
when the privilegeList is not null, I mean a Role object has more than
one Privilege, ok, everything goes well.
But when the Role doesn't has any Privilege, I hope my Dao could return
null for the property privilegeList. When I debug my program, I found
it's stranger, the privilegeList is not null, it is a List with one
element, the only one element is Privilege Object but doesn't have values.

I try to google the issue and find this:
but I really can not understand how can I achieve my goal.

Always thanks for solution or some urls reference.



Mobile: +086-15864011231

贾昊林(Haulyn Runner Jason)

View raw message