openjpa-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Patrick Linskey" <plins...@gmail.com>
Subject Re: Persistent collection
Date Wed, 14 Nov 2007 16:36:38 GMT
Hi,

You should use the OpenJPA @PersistentCollection annotation.

Note that this only works in the trunk (1.1.0-SNAPSHOT) builds, as of
maybe 3 or 4 weeks ago.

-Patrick

On Nov 14, 2007 7:43 AM, Nicolas Modrzyk <nico@intalio.com> wrote:
> Hello hello,
>
> Could someone confirm the proper way to persistent a collection/set of String:
>
> @OneToMany
> private Collection<String> set;
>
> Whatever I am trying to use is resulting in the exception below, where
> I am told to choose a different persistence strategy.
>
>     [junit] The type of field "...set" isn't supported by declared
> persistence strategy "OneToMany".  Please choose a different strategy.
>     [junit] <openjpa-1.0.0-r420667:568756 fatal user error>
> org.apache.openjpa.persistence.ArgumentException: The type of field
> "...set" isn't supported by declared persistence strategy "OneToMany".
>  Please choose a different strategy.
>     [junit]     at
> org.apache.openjpa.persistence.AnnotationPersistenceMetaDataParser.parseOneToMany(AnnotationPersistenceMetaDataParser.java:1283)
>     [junit]     at
> org.apache.openjpa.persistence.AnnotationPersistenceMetaDataParser.parseMemberAnnotations(AnnotationPersistenceMetaDataParser.java:944)
>     [junit]     at
> org.apache.openjpa.persistence.AnnotationPersistenceMetaDataParser.parseClassAnnotations(AnnotationPersistenceMetaDataParser.java:599)
>     [junit]     at
> org.apache.openjpa.persistence.AnnotationPersistenceMetaDataParser.parse(AnnotationPersistenceMetaDataParser.java:349)
>
> Thank you in advance !
>
> Niko,
>



-- 
Patrick Linskey
202 669 5907

Mime
View raw message