Hi I use something like this
@PersistentCollection private List<String> subEntries = new LinkedList<String>(); Can also be used for String arrays. I think that PersistentCollection is JPA specific, but there is a annotaion called ElementCollection, from the 2.0 spec. See this thread[1] for more info [1] http://openjpa.208410.n2.nabble.com/ElementCollection-and-PersistentCollection-td4737753.html On 8 July 2011 07:33, Suseendran.P <suseendra...@yahoo.com> wrote: > Thank you so much for ur reply..i go through the document.. > > First i have to say i'm very new to JPA.., > i'm using javax.persistence related packages to annotate my class..means > not > using org.apache.openjpa.persistence related packages..in that document > they > gave JPA is not externalized can i mix these two packages in single class.. > > i constructed my class like this.. > > @Entity > public class Station { > > @Id > @GeneratedValue(strategy = GenerationType.AUTO) > private long id; > > private String[] names; > > // setter and getter methods > } > > Now what annotation i ve to give to store this array of string names in > single row in Mysql database.. > > -- > View this message in context: > http://openjpa.208410.n2.nabble.com/How-to-store-a-string-array-as-a-string-array-using-jpa-tp209875p6561347.html > Sent from the OpenJPA Users mailing list archive at Nabble.com. >