openjpa-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Jeremy Bauer (JIRA)" <j...@apache.org>
Subject [jira] [Reopened] (OPENJPA-2117) XML overriding column names for 1xM attributes causes exception.
Date Wed, 10 Apr 2013 20:49:16 GMT

     [ https://issues.apache.org/jira/browse/OPENJPA-2117?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]

Jeremy Bauer reopened OPENJPA-2117:
-----------------------------------

    
> XML overriding column names for 1xM attributes causes exception.
> ----------------------------------------------------------------
>
>                 Key: OPENJPA-2117
>                 URL: https://issues.apache.org/jira/browse/OPENJPA-2117
>             Project: OpenJPA
>          Issue Type: Bug
>          Components: jdbc
>    Affects Versions: 1.2.3, 2.0.2, 2.1.1, 2.2.0
>            Reporter: Albert Lee
>            Assignee: Albert Lee
>             Fix For: 2.2.0
>
>
> Entity with 1xm relationship define in orm.xml causes the following exception during
emf.createEntityManager.
> +    //Removing the XML from the orm.xml file, and using this fixes the issue:
> +    //@OneToMany(fetch=FetchType.LAZY,cascade=CascadeType.ALL)
> +    private List<XMLManyToOneEntity>  xmlManyToOneList = new ArrayList<XMLManyToOneEntity>(0);
> And this mapping in the orm.xml:
> +              <one-to-many name="xmlManyToOneList" fetch="LAZY">
> +            <join-column name="IDENTITY" />
> +                 <cascade>
> +                    <cascade-all/>
> +                 </cascade>
> <openjpa-2.2.0-SNAPSHOT-r422266:1235624 fatal user error> org.apache.openjpa.persistence.ArgumentException:
You have supplied columns for "org.apache.openjpa.persistence.arrays.model.XMLOneToManyEntity.xmlManyToOneList",
but this mapping cannot have columns in this context.
> 	at org.apache.openjpa.jdbc.meta.MappingInfo.assertNoSchemaComponents(MappingInfo.java:382)
> 	at org.apache.openjpa.jdbc.meta.strats.RelationToManyTableFieldStrategy.map(RelationToManyTableFieldStrategy.java:97)
> 	at org.apache.openjpa.jdbc.meta.strats.RelationCollectionTableFieldStrategy.map(RelationCollectionTableFieldStrategy.java:95)
> 	at org.apache.openjpa.jdbc.meta.FieldMapping.setStrategy(FieldMapping.java:146)
> 	at org.apache.openjpa.jdbc.meta.RuntimeStrategyInstaller.installStrategy(RuntimeStrategyInstaller.java:82)
> 	at org.apache.openjpa.jdbc.meta.FieldMapping.resolveMapping(FieldMapping.java:496)
> 	at org.apache.openjpa.jdbc.meta.FieldMapping.resolve(FieldMapping.java:461)
> 	at org.apache.openjpa.jdbc.meta.ClassMapping.resolveMapping(ClassMapping.java:865)
> 	at org.apache.openjpa.meta.ClassMetaData.resolve(ClassMetaData.java:1802)
> 	at org.apache.openjpa.meta.MetaDataRepository.processBuffer(MetaDataRepository.java:821)
> 	at org.apache.openjpa.meta.MetaDataRepository.resolveMapping(MetaDataRepository.java:776)
> 	at org.apache.openjpa.meta.MetaDataRepository.resolve(MetaDataRepository.java:656)
> 	at org.apache.openjpa.meta.MetaDataRepository.getMetaDataInternal(MetaDataRepository.java:410)
> 	at org.apache.openjpa.meta.MetaDataRepository.getMetaData(MetaDataRepository.java:383)
> 	at org.apache.openjpa.jdbc.meta.MappingRepository.getMapping(MappingRepository.java:352)
> 	at org.apache.openjpa.jdbc.meta.MappingTool.getMapping(MappingTool.java:682)
> 	at org.apache.openjpa.jdbc.meta.MappingTool.buildSchema(MappingTool.java:754)
> 	at org.apache.openjpa.jdbc.meta.MappingTool.run(MappingTool.java:652)
> 	at org.apache.openjpa.jdbc.kernel.JDBCBrokerFactory.synchronizeMappings(JDBCBrokerFactory.java:154)

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

Mime
View raw message