Java Mailing List Archive

Home » users.openjpa »

"Unwrapping" enhanced entity

Reinis Vicups


Author LoginPost Reply

I would like to pass an enhanced entity
($MyClass$0$proxy) to an 3rd party framework
that does some reflection stuff. In particular, that framework does

According to spec (read it someplace in oracle docs) - proxy shall
return a null array when getFields() is being invoked. This is also
happening in my case.

The 3rd party framework fails since it does not find any fields.

I am looking now for a good practice on how to "unwrap" the entity or
modify that 3rd party framework in a way that I get access to the
original field array of com.MyClass.

myEntity.getClass.getGenericSuperclass() returns the right type
(com.MyClass) but I am unsure on if and how to instrumentalize this.

I'd greatly appreciate any hints on this one.

kind regards
©2008 - Jax Systems, LLC, U.S.A.