Giora,
the elements <fk-pointing-to-this-class> and
<fk-pointing-to-element-class> must specifiy the foreign key columns in
the indirection table, not the primary keys of the linked tables. These fk
columns necessarily have different names as the are in the same table.
HTH
Gerhard
-------- Original Message --------
Subject: SQLGenerator
Date: Wed, 8 Oct 2003 15:26:40 -0400
From: [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Hi Thomas.
My name is Giora.
I am using OJB (Love it).
In my repository I have the following mapping for a collection using m:n
without decomposition:
<collection-descriptor
name="children"
collection-class="org.apache.ojb.odmg.collections.DListImpl"
element-class-ref="com.bony.framework.acl.dao.GroupDAO"
proxy="true"
auto-retrieve="true"
auto-update="false"
auto-delete="false"
indirection-table="A_GTM_REL_GRP"
>
<fk-pointing-to-this-class column="GRP_REF_ID"/>
<fk-pointing-to-element-class column="GRP_REF_ID"/>
</collection-descriptor>
Since both table use the GRP_REF_ID column name OJB generates SQL
without fully qualifying the column names. The result is the following
exception:
The column "GRP_REF_ID" is specified more than once in the INSERT,
UPDATE or SET transition-variable statement. SQLSTATE=42701.
Is there any way to instruct OJB to pre append the table alias to the
column name?
Thank you,
Giora
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]