Hello.
I've got a problem obtaining data from a table with a 'in'.
I want to make a query like : SELECT * FROM tableA WHERE column1 IN (SELECT
column2 FROM tableB where column3 = '?')
I do it with SQL directly in my code (by using
QueryFactory.newQuery(tableA.class, sql)).
The problem is I want to do it with Criterias or anything else in OJB, I
tried it in criteria, I wrote :
criteriaIn.addEqualTo("column3", tableB.getColumn3());
Query queryIn = QueryFactory.newQuery(tableB.class, criteriaIn);
criteria.addIn("column1", broker.getCollectionByQuery(queryIn));
OJB returned me an Oracle error : invalid column name.
I think it's because he returns the entire object and I don't know how to
retrieve only one column from the query.
I'm using OJB 0.9.7, Oracle 8.1 and the database hasn't got any primary and
foreign keys.
Do you have any idea of how I could retrieve only one column in OJB in order
to pass it as an argument to Criteria#addIn ?
Thanks in advance.
Olivier Hennebelle
mail : [EMAIL PROTECTED]
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]