hi guido,

yiu should not use column-names in your queries. use attribute-names instead.

please post the relevant parts of the repository.xml.

jakob

Guido Beutler schrieb:
Hi,

I have a problem building  query about more than one table when the field in a 
where clause with OJB 1.0.4
occur in more than one table with the same name.
In SQL the following would work:

select * from table_a A0, table_b A1 where A0.key=A1.key and A0.key=5 ;

OJB builds a query where A0 and A! for the key ist correctly set.
My Problem is at the Criteria where I would set:

crit.addEqualTo("A0.key",key);

This causes a NullPointer at  broker.getCollectionByQuery(q);

If I set  the same without the A0

crit.addEqualTo("key",key);

There is no NullPointer but a SQL Exception which tells me that key is 
ambiguous.
How can I build queries like this? Thanks in advance,

best regards,

Guido

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]




---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to