persistence@glassfish.java.net

RE: How to write descriptor for [java.util.ArrayList]

From: Gordon Yorke <gordon.yorke_at_oracle.com>
Date: Tue, 29 Aug 2006 11:15:54 -0400

Hello Dirk,
    The specification does not directly provide support for Collections of non entity objects. You could create an Entity that wraps the QName and the String as Embedables then map the OneToMany to the wrapper Entity. Otherwise you will need to map the list as @Basic and the list will be stored in the database as a serialized object.
--Gordon

-----Original Message-----
From: Dirk Bangel [mailto:dirk.bangel_at_gmx.de]
Sent: Tuesday, August 29, 2006 1:10 AM
To: persistence_at_glassfish.dev.java.net
Subject: RE: How to write descriptor for [java.util.ArrayList]


Thank you for your quick response Gordon.

May I get my fault?! My collection inner type hasn't a given mapping!
I have two @OneToMany relationships...

List<QName>
List<String>

... Than I have two give a descriptor for the QName mapping.
But how to do it correct

a. orm.xml file or
b. programmatically?

Best regards

Dirk

-----Original Message-----
From: Gordon Yorke [mailto:gordon.yorke_at_oracle.com]
Sent: Montag, 28. August 2006 12:53
To: persistence_at_glassfish.dev.java.net
Subject: RE: How to write descriptor for [java.util.ArrayList]

What sort of mapping is using the ArrayList? You should not need to map the
ArrayList directly?
--Gordon

-----Original Message-----
From: Dirk Bangel [mailto:dirk.bangel_at_gmx.de]
Sent: Monday, August 28, 2006 12:24 PM
To: persistence_at_glassfish.dev.java.net
Subject: How to write descriptor for [java.util.ArrayList]


Does anyone know how to write an descriptor for java.util.ArrayList,
because TopLink cause:

Exception in thread "main" javax.persistence.RollbackException:
Exception [TOPLINK-7009] (Oracle TopLink Essentials - 2006.7 (Build
060731)): oracle.toplink.essentials.exceptions.ValidationException
Exception Description: Missing descriptor for [java.util.ArrayList].
Verify that the descriptor has been properly registered with the Session.
--
Der GMX SmartSurfer hilft bis zu 70% Ihrer Onlinekosten zu sparen!
Ideal für Modem und ISDN: http://www.gmx.net/de/go/smartsurfer