users@glassfish.java.net

RE: basic jpa collection question

From: Gordon Yorke <gordon.yorke_at_oracle.com>
Date: Thu, 8 Mar 2007 16:25:18 -0500

Hello,
    It is possible to create a list of non entities but the entire list will be written to the database as a serialized object. Although TopLink Essentials has support for writing this relationship to a table it has yet to be exposed through the Java Persistence APIs. You could make use of a Session Customizer to add the mapping type (DirectCollectionMapping) to the TopLink meta-data but in the shortterm it would be easier for you to wrap the data within an Entity.
--Gordon

-----Original Message-----
From: glassfish_at_javadesktop.org [mailto:glassfish_at_javadesktop.org]
Sent: Thursday, March 08, 2007 4:19 PM
To: users_at_glassfish.dev.java.net
Subject: basic jpa collection question


I've been searching for this and looking in the spec but I don't see the answer.
I know that you can have an entity with persistent field or property of type enum or Integer. Is it possible to specify a Collection(set or list) of something like Set<Enumtype> or Set<Integer>? And if so could you give an example. Or will I need to create an entity wrapper for that?
Thanks in advance.
[Message sent by forum member 'jland' (jland)]

http://forums.java.net/jive/thread.jspa?messageID=206978

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe_at_glassfish.dev.java.net
For additional commands, e-mail: users-help_at_glassfish.dev.java.net