Hi,
I posted this already but found no solution despite
I looked at all the castor-examples and couldn't find any mistake.
I work with Oracle 8i (8.1.7.) and Castor 0.9.4.
When I use mySQL or PostreSQL, the same example works (just exchanging
the database.xml), so i think it could be a bug.
My oracle-driver is up to date, and when i remove the many-to-many field
from mapping.xml it works with oracle too.
Here is the problem again, a simple many-to-many relation mapping
my mapping.xml:
[...]
<class name="com.xyz.access.User" identity="id">
<map-to table="USERS"/>
<field name="id" type="integer" >
<sql name="ID" type="integer"/>
<xml node="attribute"/>
</field>
<field name="name" type="string">
<sql name="NAME" type="char" dirty="check" />
<xml node="text" />
</field>
<field name="password" type="string">
<sql name="PASSWORD" type="char" dirty="check" />
<xml node="text" />
</field>
<field name="roles" type="com.xyz.workflows.Role"
collection="arraylist">
<sql name="ROLE_ID" many-table="ROLES_USERS" many-key="USER_ID"/>
</field>
</class>
<class name="com.xyz.workflows.Role" identity="id">
<map-to table="ROLES"/>
<field name="id" type="integer" >
<sql name="ID" type="integer"/>
<xml node="attribute"/>
</field>
<field name="name" type="string">
<sql name="NAME" type="char" dirty="check" />
<xml node="text" />
</field>
<field name="users" type="com.xyz.access.User" collection="arraylist">
<sql name="USER_ID" many-table="ROLES_USERS" many-key="ROLE_ID"/>
</field>
</class>
[...]
and my sql-tables:
USERS:
ID NUMBER
NAME VARCHAR
PASSWORD VARCHAR
ROLES:
ID NUMBER
NAME VARCHAR
ROLES_USERS:
ID NUMBER
ROLE_ID NUMBER
USER_ID NUMBER
When i execute any OQL-query like 'OQL-Querry: SELECT id FROM
com.xyz.access.User id where
name="superuser"' i get the error-message: java.sql.SQLException:
ORA-00936: missing expression.
Could anyone confirm or refute this claim?
Thanks for any suggestions.
Steffen
-----------------------------------------------------------
If you wish to unsubscribe from this mailing, send mail to
[EMAIL PROTECTED] with a subject of:
unsubscribe castor-dev
- [castor-dev] Date: Tue, 29 Oct 2002 11:08:00 +0100 Steffen Fiedler
- Re: [castor-dev] Date: Tue, 29 Oct 2002 11:08:00 +01... Bruce Snyder
- Re: [castor-dev] Bug with Oracle 8i and many-to-many... Steffen Fiedler
- Re: [castor-dev] Bug with Oracle 8i and many-to-... Keith Visco
- Re: [castor-dev] Bug with Oracle 8i and many... Sergej Maslyukov
