> check the mapping file use extends key word when defining a class and a
> parent class
>
yeah, it does. the mapping and all is correct. if i add a dummy field to
the table C and the class C, it works fine. then the update statement that
castor exceutes reads as :
UPDATE "C" SET "dummy"=? WHERE "id"=? and "dummy"=?
but whithout the dummy field, it reads:
UPDATE "C" SET WHERE "id"=?
which IS NOT A VALID sql statement.
> <class name="C" extends="P" identity="id">
> </class>
>
> -----Original Message-----
> From: Anand Janakiraman [mailto:[EMAIL PROTECTED]
> Sent: Friday, March 28, 2003 12:49 PM
> To: [EMAIL PROTECTED]
> Subject: [castor-dev] Child table with only one column.
>
>
> Hi,
>
> We have the followign scenario, while using JDO:
>
> Parent class P with two fields:
> int id;
> string p;
> Class C which extends P, with field id, and a many-to-many association
> to Class A:
> int id;
> Vector a;
>
> The database tables look as follows:
> table P:
> id int PK
> p varchar
>
> table C:
> id int PK
>
> (linking) table CA:
> c_id int
> a_id int
>
> now, when a db.update is called on an object of class C, castor throws
> the following exception :
> java.sql.SQLException: ORA-01747: invalid user.table.column, table.column,
> or column specification
> problem is that the update statement for C, reads as:
> UPDATE "C" SET WHERE "id"=?
>
> since the table does not have any columns (or attributes) - only
> associations - the update statement doesnt read correctly..
>
> how do we avoid the problem?
>
> thanks,
> anand.
>
> -----------------------------------------------------------
> If you wish to unsubscribe from this mailing, send mail to
> [EMAIL PROTECTED] with a subject of:
> unsubscribe castor-dev
>
> -----------------------------------------------------------
> If you wish to unsubscribe from this mailing, send mail to
> [EMAIL PROTECTED] with a subject of:
> unsubscribe castor-dev
>
-----------------------------------------------------------
If you wish to unsubscribe from this mailing, send mail to
[EMAIL PROTECTED] with a subject of:
unsubscribe castor-dev