openjpa-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "catalina wei" <catalina....@gmail.com>
Subject Re: Annotation of Arraylist<String> myList;
Date Sun, 13 Apr 2008 04:05:05 GMT
Hi Lars,
Want to correct my previous email.
OpenJPA does have this feature implemented already, an example can be found
in
org.apache.openjpa.persistence.annotations.common.apps.annotApp.annotype.OrderByEntity:
    @PersistentCollection
    @OrderBy
    private List<String> strings = new ArrayList();

If you search for "@PersistentCollection" under
openjpa-persistence-jdbc/src/test/java folder,
you will get lots of examples.

Catalina

On 4/12/08, Janko Heilgeist <janko.heilgeist@rzg.mpg.de> wrote:
>
> catalina wei wrote:
>
> > Hi Lars,
> > The feature you are looking for has been addressed in the draft of  JPA
> > 2.0
> > spec Section 2.1.5 Collections of Embeddable Classes and Basic Types.
> > I don't think we have this feature implemented in the current OpenJPA
> > releases.
> >
> > Catalina
> >
> > On 4/11/08, Lars Vogel <lars.vogel@googlemail.com> wrote:
> >
> > > Hello,
> > >
> > > I would like to persist a object which contains a list of primitives
> > > (Strings). It is possible or can JPA only store real objects?
> > >
> > > I tried it an received an error.
> > >
> > > Best regards, Lars
> > >
> > >
> >
> Hi,
>
> what about @org.apache.openjpa.persistence.PersistentCollection? I've
> never used it myself, but someone mentioned this feature a few days ago on
> this mailinglist.
>
> @Entity
> public MyObject {
>
> @PersistentCollection
> private Collection<String> users;
>
> }
>
> It is not standard-JPA, though.
>
> Janko
>
>

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message