PluralAttribute.getJavaType returns element type instead of collection type [message #536547] |
Fri, 28 May 2010 12:06  |
Eclipse User |
|
|
|
In eclipselink implementation of JPA 2.0 metamodel API, PluralAttribute.getJavaType() returns the element type instead of the collection type. Here's the snippet:
org.eclipse.persistence.internal.jpa.metamodel.PluralAttributeImpl.java:
/**
* Return the Java type of the represented attribute.
* @return Java type
*/
@Override
public Class<C> getJavaType() {
return (Class<C>)elementType.getJavaType();
}
Is this what the specification means, or just a bug? I have checked the source code of hibernate, they choose to return the collection type from the method. I think this make sence because for a PluralAttribute, we have getElementType method there.
I'm working on eclipselink-2.0.2.v20100323-r6872.
Thanks for any helps
Roger
|
|
|
|
|
|
Powered by
FUDForum. Page generated in 0.31120 seconds