[
https://issues.apache.org/jira/browse/OPENJPA-623?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Catalina Wei resolved OPENJPA-623.
----------------------------------
Resolution: Won't Fix
To get the support for collection-type field mapping from OpenJPA 1.1.0 or
later releases, you need to
specify the following property in the persistence.xml:
<property name="openjpa.Compatibility"
value="storeMapCollectionInEntityAsBlob=true"/>
> OpenJPA 1.1.0 doesn't allow collection-type fields to have @Column defined on
> them, while OpenJPA 1.0.0 does.
> --------------------------------------------------------------------------------------------------------------
>
> Key: OPENJPA-623
> URL: https://issues.apache.org/jira/browse/OPENJPA-623
> Project: OpenJPA
> Issue Type: Bug
> Components: third-party
> Reporter: Jianfeng Mao
> Priority: Blocker
>
> IBM U2 databases allow a single field to store multiple-values. So we use
> mappings as following to map such a multi-valued field.
> @Column(name="ADDRESS")
> @PersistentCollection(fetch=FetchType.EAGER)
> private String[] address;
> @Column(name="CATEGORIES_LIKED")
> @PersistentCollection(fetch=FetchType.EAGER)
> private String[] categories_liked;
> This worked fine with OpenJPA 1.0.0. But the new OpenJPA 1.1.0 throws
> exceptions like the following when parsing the mapping, is there a way to
> bring back the behavior of OpenJPA 1.0.0?
> <openjpa-1.1.0-r422266:657916 fatal user error>
> org.apache.openjpa.persistence.ArgumentException: You have supplied columns
> for "sampleear.Customer.categories_liked", but this mapping cannot have
> columns in this context.
> at
> org.apache.openjpa.jdbc.meta.MappingInfo.assertNoSchemaComponents(MappingInfo.java:327)
> at
> org.apache.openjpa.jdbc.meta.strats.HandlerCollectionTableFieldStrategy.map(HandlerCollectionTableFieldStrategy.java:100)
> at
> org.apache.openjpa.jdbc.meta.FieldMapping.setStrategy(FieldMapping.java:120)
> at
> org.apache.openjpa.jdbc.meta.RuntimeStrategyInstaller.installStrategy(RuntimeStrategyInstaller.java:80)
> at
> org.apache.openjpa.jdbc.meta.FieldMapping.resolveMapping(FieldMapping.java:438)
> at
> org.apache.openjpa.jdbc.meta.FieldMapping.resolve(FieldMapping.java:403)
> at
> org.apache.openjpa.jdbc.meta.ClassMapping.resolveNonRelationMappings(ClassMapping.java:851)
> at
> org.apache.openjpa.jdbc.meta.ClassMapping.resolveMapping(ClassMapping.java:808)
> at
> org.apache.openjpa.meta.ClassMetaData.resolve(ClassMetaData.java:1625)
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.