Hi Wim, 

In my code snippet I have shown the mapping in orion-ejb-jar.xml, that is as
follows:

<primkey-mapping>
<cmp-field-mapping name="key">
<fields>
<cmp-field-mapping name="key" persistence-name="key" />
</fields>
</cmp-field-mapping>
</primkey-mapping>

This "compound" PK class has one field for sake of simplicity. I tried to
follow the instructions of the article you have also mentioned but still got
that ugly error.

Auto-deploying beantest-ejb.jar (orion-ejb-jar.xml had been updated since
the previous deployment)... ProductRemote_EntityBeanWrapper0.java:781:
Incompatible type for method. Can't convert beantest.ejb.ProductPK to int.
                                        statement.setInt(4, object.key);
                                                                  ^
ProductHome_EntityHomeWrapper7.java:388: Incompatible type for method. Can't
convert beantest.ejb.ProductPK to int.
                                statement.setInt(4, response.object.key);
                                                                   ^
2 errors
Error compiling file:/E:/Java/BeanTest/build/beantest/beantest-ejb.jar:
Syntax error in source

So am still lost with this issue.

Thanks!

-----Original Message-----
From: wim veninga [mailto:[EMAIL PROTECTED]]
Sent: Monday, December 04, 2000 1:01 PM
To: Orion-Interest
Subject: Re: OR mapping with Oracle


You can use complex OR mapping with orion, for instance if you have an
compound PK object you can
map all its fields to different columns in the database table

See orionsupport -> complex or mapping
http://www.orionsupport.com/articles/complex-or.html

----- Original Message -----
From: "Hegyi Tibor" <[EMAIL PROTECTED]>
To: "Orion-Interest" <[EMAIL PROTECTED]>
Sent: Monday, December 04, 2000 7:46 AM
Subject: RE: OR mapping with Oracle


> Thanks for your reply.
>
> My PK class implements the Serializable interface (see code snippet in my
> first mail) but this does not help since Orion maps Serializable objects
to
> blob datatypes in relation with Oracle data source and blobs cannot be
> indexed.
>
> Integer object works fine but how can I implement compound primary keys
> then?
>
> Tibor
>
> -----Original Message-----
> From: J Davis [mailto:[EMAIL PROTECTED]]
> Sent: Friday, December 01, 2000 9:38 PM
> To: Orion-Interest
> Subject: RE: OR mapping with Oracle
>
>
> I beleive primary keys must be Serializalble.  Try using an Integer object
> instead.
>
> Later
>
> Greg
>
>


Reply via email to