POJO containing a List of persistent objects fails
Status: Inactive
Brought to you by:
bmarchesson
Hi
in this simple example:
@Entity
class A {
}
class B{
List<A> list;
public List<A> getList() { return list; }
public void setList(List<A> l) { list = l; }
}
if a gwt service is returning an instance of B class then hibernate4gwt will fail to clone it correctly due to a bug in net.sf.hibernate4gwt.core.HibernateBeanManager#holdPersistentObject method:
the condition:
(ClassUtils.immutable(propertyClass) == false) && (ClassUtils.isJavaPackage(propertyClass) == false)
is false for List<A> because List is a java package =(
Actually I can see this was fixed in r278 on 29 Aug in trunk ... how comes it's not there in release on 24th Sep?
patch to fix branch
Today I noticed that branch was updated with code merged from the trunk to fix this issue. I checked it out and built to use. But apparently the fix was somewhat faulty (both in the branch and the trunk). Pleas find attached a patch for current branch that fixes the issue correctly.