Hi Jakob,
I am using OJB 1.0.4 but maybe that I did not change the repository.xml.
You are right that I query for table_a. The resolve to A0 and A1 works for the
A0.key=A1.key
but not for the criteria. The
crit.addEqualTo("key",new Integer(5));
crit.addEqualTo("table_b.otherfield",new Integer(1
hi guido,
i assume that you query for instances of table_a. in this case ojb
should resolve 'key' to 'A0.key' amd 'otherfield' to 'A1.otherfield'.
what version of ojb are you using ? inverse-foreignkeyfield-id-ref
looks rather old to me ?
jakob
Guido Beutler schrieb:
Hi Jakob,
here is a
Hi Jakob,
here is a sample, I can not post the original code, sorry.
what I am doing I now:
crit.addEqualTo("key",new Integer(5));
crit.addEqualTo("table_b.otherfield",new Integer(10));
The problem now is, that "key" is a column in both table but the query,which is
build by OJB, adds "select
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
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