I've got a bit of an odd criteria i need to specify, but i cant seem to get
it to work.

A has a reference to B, B has a reference to C.  C  had a reference to D. D
has a collection of Cs and a reference to the currentC.

I need to obtain all As where their C (via B) is current. Ie. such that
a.getB().getC().getId() == a.getB().getC().getD().getCurrentCId().

I have tried:
crit.addEqualToField("b.c.id","b.c.d.currentCId");

But i get an error:

[org.apache.ojb.broker.accesslayer.JdbcAccessImpl] ERROR: SQLException
during the execution of the query (for a
com.netcase.lecrossing.bo.BehaviourRating): Column not found, message from
server: "Unknown column 'currentPdpId' in 'where clause'"
Column not found, message from server: "Unknown column 'currentPdpId' in
'where clause'"
java.sql.SQLException: Column not found, message from server: "Unknown
column 'currentPdpId' in 'where clause'"

Should OJB be able to do this?

At the moment i am omiting this criteria, then manually filtering each
returned element.

Daniel.


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

Reply via email to