Lionel wrote:
> Hi Aaron
>
>
> I add logs to EntityUtil.java: I can see that the
> deproxifyCglibClass() works fine: the Field accessor containing the
> Id is found. But ((Field) accessor).get(entity) always return null.
> I've logged the value of entity.toString (which return the Id value):
> the right value is displayed.
>
> Did someone manage to use stripersist with lazy loaded @ManyToOne ?



Found a solution: invoking the getter of the property instead of getting its 
value solves the problem.
this doesn't work:
return ((Field) accessor).get(entity);

this works:
return org.apache.commons.beanutils.PropertyUtils.getProperty(entity, 
((Field) accessor).getName());

I also had to remove the check for Entity annotation in 
entityFormatter.format(Object) (called before deproxification...)



Lionel 




-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
_______________________________________________
Stripes-users mailing list
Stripes-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/stripes-users

Reply via email to