db-ojb-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Sander Hofstee <sander.hofs...@topicus.nl>
Subject Re: Column: 'id' in where clause is ambiguous
Date Fri, 31 Jan 2003 08:11:27 GMT
The query was a simple query to select all StatusOvergang objects with 
all its sub objects. It worked with previous versions of OJB.

OQLQuery query = odmg.newOQLQuery();
query.create("select x from " + StatusOvergang.getName());
result = (List)query.execute();

where StatusOvergang
has a collection of Brief objects

Jakob Braeuchi wrote:

> hi sander,
>
> what's the query you executed ?
>
> jakob
>
> Sander Hofstee wrote:
>
>> Sorry, put it in the wrong thread.
>>
>> I downloaded the latest CVS version of ojb and tried to make this work.
>> But when I try to load an object with an indirection table  I get an 
>> error:
>> General error: Column: 'id' in where clause is ambiguous
>>
>> <collection-descriptor name="brieven"
>> element-class-ref="nl.topicus.rvc.object.Brief"
>> indirection-table="statusovergang_parameter">
>> <fk-pointing-to-this-class column="statusovergang_ID"/>
>> <fk-pointing-to-element-class column="brief_ID"/>
>> </collection-descriptor>
>>
>> This is the query that is done according to the debug info:
>> SELECT A0.briefnaam,A0.volgnummer,A0.id FROM brief
>> A0,statusovergang_parameter WHERE
>> (statusovergang_parameter.statusovergang_ID = ? ) AND
>> statusovergang_parameter.brief_ID = id
>>
>> But I think I should be
>> SELECT A0.briefnaam,A0.volgnummer,A0.id FROM brief
>> A0,statusovergang_parameter WHERE
>> (statusovergang_parameter.statusovergang_ID = ? ) AND
>> statusovergang_parameter.brief_ID = A0.id
>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: ojb-dev-unsubscribe@jakarta.apache.org
>> For additional commands, e-mail: ojb-dev-help@jakarta.apache.org
>>
>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: ojb-dev-unsubscribe@jakarta.apache.org
>> For additional commands, e-mail: ojb-dev-help@jakarta.apache.org
>>
>>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: ojb-dev-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: ojb-dev-help@jakarta.apache.org
>
>



Mime
View raw message