Hi Francesco, the oql-support isn't fully implemented. http://db.apache.org/ojb/status.html
Maybe it's possible to do a workaround by using the Criteria-API http://db.apache.org/ojb/docu/guides/odmg-guide.html#no-oql http://db.apache.org/ojb/docu/guides/query.html#subqueries regards, Armin Francesco Martinelli wrote:
Dear all, I need to filter a query using an SQL function. In SQL this would be achieved with the following statement: select * from myTable where key in (select * from myFunc(myParam)) I tried the same with ODB-ODBC, and this worked using the following query string: String oqlQuery = "select myObject from " + myClass.getName() + " where key IN (select * from myFunc(" + myParam.toString() + "))"; However it generated an error at the moment of binding the parameter using the following query string: String oqlQuery = "select myObject from " + myClass.getName() + " where key IN (select * from myFunc($1))"; After creating the qury with: query.create(oqlQuery); The error (QueryParameterCountInvalidException) was generated at the following line: query.bind((Float)myParam); Can anybody tell me if it is possible to use the query string in the second form? Thank you, Francesco. --------------------------------------------------------------------- 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]