Hi,

Take a look at <orion>\docs\or-howto.html . Basically, what it tells you to
do is provide the type of the elements in your Collection. With this extra
info orion can generate the correct orion-ejb-jar.xml for you.

Once you have the correct orion-ejb-jar.xml, you can use that and remove the
'items_type' attribute from your code.

Marcel

----- Original Message -----
From: "Hamidou DIA" <[EMAIL PROTECTED]>
To: "Orion-Interest" <[EMAIL PROTECTED]>
Sent: Thursday, May 31, 2001 9:27 PM
Subject: Advanced O-R Mapping


> Hi,
> I am trying to use the Orion advanced O-R mapping
> features. I have an entity bean "Event" which contains
> a Collection of "Attachements". At deployment time,
> Orion creates a perfect table for Event but the
> Event_Attachements table is created with one column of
> type LONG RAW. How can I get Orion to create the table
> with the attachements fields.
> I have attached an extract of my bean class and
> orion-ejb-jar.xml
>
> Thanks for your help.
>
>
> __________________________________________________
> Do You Yahoo!?
> Get personalized email addresses from Yahoo! Mail - only $35
> a year!  http://personal.mail.yahoo.com/


----------------------------------------------------------------------------
----


> <?xml version="1.0"?>
> <!DOCTYPE orion-ejb-jar PUBLIC "-//Evermind//DTD Enterprise JavaBeans 1.1
runtime//EN" "http://www.orionserver.com/dtds/orion-ejb-jar.dtd";>
>
> <orion-ejb-jar deployment-version="1.4.5" deployment-time="e6c6f7965e">
> <enterprise-beans>
> <entity-deployment name="Event" location="Event"
wrapper="EventHome_EntityHomeWrapper2" table="Event"
data-source="jdbc/MdbDB">
> <primkey-mapping>
> <cmp-field-mapping name="eventId" persistence-name="eventId" />
> </primkey-mapping>
> <cmp-field-mapping name="name" persistence-name="name" />
> <cmp-field-mapping name="phase" persistence-name="phase" />
> <cmp-field-mapping name="projectId" persistence-name="projectId" />
> <cmp-field-mapping name="itemId" persistence-name="itemId" />
>       <!-- Event Attachements -->
> <cmp-field-mapping name="attachements" persistence-name="attachements">
> <list-mapping table="Event_Attachements">
> <value-mapping type="cora.bo.Attachement">
> <fields>
>           <cmp-field-mapping name="id" persistence-name="id"
persistence-type="number(20,0)"  />
>           <cmp-field-mapping name="type" persistence-name="type"
persistence-type="varchar2(30)"  />
>           <cmp-field-mapping name="title" persistence-name="title"
persistence-type="varchar2(30)"  />
>           <cmp-field-mapping name="description"
persistence-name="description" persistence-type="varchar2(30)"  />
>           <cmp-field-mapping name="fileName" persistence-name="fileName"
persistence-type="varchar2(30)" />
>           <cmp-field-mapping name="url" persistence-name="url"
persistence-type="varchar2(30)" />
>                 <cmp-field-mapping name="comment"
persistence-name="comment" persistence-type="varchar2(255)" />
>                </fields>
> </value-mapping>
> </list-mapping>
>       </cmp-field-mapping>
>   </entity-deployment>
> </enterprise-beans>
> <assembly-descriptor>
> <security-role-mapping name="PUBLIC">
> </security-role-mapping>
> <default-method-access>
> <security-role-mapping name="&lt;default-ejb-caller-role&gt;"
impliesAll="true" />
> </default-method-access>
> </assembly-descriptor>
> </orion-ejb-jar>
>


Reply via email to