hi,
problem: after hibernate cached a set of objects, i have problems with comparing:
Session1:
--
group = hibSess.load(XBO_CLASS, "12345");
groups.add(group);
--
Session2:
--
group = hibSess.load(XBO_CLASS, "12345");
if (groups.contains(group)) {
logger.debug("works!");
}
--
When starting my Application this works fine, when invoking this method the second time, it doesn't!
the follwing works fine all the time:
--
group = hibSess.load(XBO_CLASS, "12345");
Iterator i = groups.iterator();
while (i.hasNext()) {
Group workaround = (Group) i.next();
if (groups.contains(group)) {
logger.debug("works!");
}
}
s.th. because of lazy-init? I do not want to turn it off.
a bug?
thanks, marie
|