Menu

#10 POJO containing a List of persistent objects fails

open
nobody
POJO Clone (7)
5
2008-10-04
2008-10-04
atamur
No

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 =(

Discussion

  • atamur

    atamur - 2008-10-06

    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?

     
  • atamur

    atamur - 2008-10-07

    patch to fix branch

     
  • atamur

    atamur - 2008-10-07

    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.

     

Log in to post a comment.

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.