Backref properties should be ignored when building the JPA 2 metamodel (leading atm to java.lang.IllegalArgumentException: Cannot determine java-type from given member [null])

Description

When I specifically run VersionsJoinTableRangeComponentNamingTest
I've got a
java.lang.IllegalArgumentException: Cannot determine java-type from given member [null]
at org.hibernate.ejb.metamodel.AttributeFactory$BaseAttributeMetadata.<init>(AttributeFactory.java:591)
at org.hibernate.ejb.metamodel.AttributeFactory$SingularAttributeMetadataImpl.<init>(AttributeFactory.java:671)
at org.hibernate.ejb.metamodel.AttributeFactory$SingularAttributeMetadataImpl.<init>(AttributeFactory.java:661)
at org.hibernate.ejb.metamodel.AttributeFactory.determineAttributeMetadata(AttributeFactory.java:542)
at org.hibernate.ejb.metamodel.AttributeFactory.buildAttribute(AttributeFactory.java:81)
at org.hibernate.ejb.metamodel.MetadataContext.wrapUp(MetadataContext.java:177)
at org.hibernate.ejb.metamodel.MetamodelImpl.buildMetamodel(MetamodelImpl.java:66)
at org.hibernate.ejb.EntityManagerFactoryImpl.<init>(EntityManagerFactoryImpl.java:79)
at org.hibernate.ejb.Ejb3Configuration.buildEntityManagerFactory(Ejb3Configuration.java:752)
at org.hibernate.envers.test.AbstractEntityTest.init(AbstractEntityTest.java:94)
at org.hibernate.envers.test.AbstractEntityTest.init(AbstractEntityTest.java:82)

The member is null because the "property" has a backref getter and hence no member is returned by NORMAL_MEMBER_RESOLVER. I think we should ignore backref properties

Does that make sense? If we agree, I will go and apply a fix.

Environment

None

Activity

Show:
Emmanuel Bernard
January 15, 2010, 12:48 PM

Fixed but I've found another issue

Steve Ebersole
March 21, 2011, 7:09 PM

Bulk closing stale resolved issues

Fixed

Assignee

Emmanuel Bernard

Reporter

Emmanuel Bernard

Fix versions

Labels

None

backPortable

None

Suitable for new contributors

None

Requires Release Note

None

Pull Request

None

backportDecision

None

Components

Affects versions

Priority

Major
Configure