[
Date Prev][
Date Next][
Thread Prev][
Thread Next][
Date Index][
Thread Index]
[
List Home]
Re: [eclipselink-users] jpa + reflection
|
Assuming you are using PROPERTY access, there are a couple of Options.
1. You should be able to navigate the JPA metamodel to find the getter method
associated with the properties you are interested in.
2. If that doesn't work, you can use internal EclipseLink API. You can use our
JPAHelper class to unwrap the EclipseLink session, then you can get the
descriptor for your Entity and look at the accessor for the mappings you are
interested in.
If you are using FIELD access, you will probably have to do one of the above and
then write some custom code to guess the method name based on the field name.
-Tom
On 14/10/2011 5:59 AM, Joao Cabral wrote:
I am experiencing a problem that maybe someone can help me, although not
directly related to EclipseLink.
I'm building a generic dynamic lookup and accessing @JoinColumns or @JoinColumn
I get the name of the related fields.
The problem is to select the corresponding getters/setters for the fields
belonging to the composite keys.