Re: Some problems implementing EJB 2.0 type OR

2001-05-15 Thread James Donnelly

Hi Mathias,

What I found was that if I changed the object type for my reference field
from Vector to List, Orion was happy to work with it.

I decided to rework the interface to my beans so that operations like
getting the set of child object references from an EJB involved passing out
a list instead of a vector, however you could keep the interface the same
and convert the vectors to lists for persistence only.

Incidentally, I was also trying to get Orion to map hashtables into OR
tables, which also failed.  Similarly, changing the hashtable to a map
worked fine.

One problem though,  In the case of OR mapped maps, when you call remove()
on the EJB containing the map field, the container doesn't seem to want to
remove the corresponding row from the OR mapped table.

Hope this helps

regards,

James


- Original Message -
From: "Mathias" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Tuesday, May 15, 2001 10:55 AM
Subject: Some problems implementing EJB 2.0 type OR


> Hello,
>
> I'm also having this problem with my web-application. How did you solve
it?
>
> TIA
>
> Mathias Bogaert
>





Some problems implementing EJB 2.0 type OR

2001-05-03 Thread James Donnelly

Hi,

I'm trying to change the way my application does OR on my entity beans.  I
have encountered a problem.

Using Orion 1.4.8.

I have an EJB which has a vector field, listIDs, which contains Integer ID
references to child EJBs.  In my EJB code I have used the following syntax:

public static final Class listIDs_type=java.lang.Integer.class;

This seems to work on deployment, as there is a new table created called
..Catalogue_elementList on the next deployment.   However when I try to
execute some code I get a :

ClassCastException: Assigning instance of class java.util.ArrayList to field
com.evermind.server.ejb.ORVector#list

Any ideas?

Cheers,

James