After taking out that criteria, it still doesnt work.

The following line is also causing the same error.  Once again, running an
equivilent if statement on the results does work!
crit.addEqualTo("b.c.d.training",new Integer(0));

The only thing i can think of is that b defines no fields, but has extents
which do.

When i get back in an hour or so, i will try to get pspy6 to work, and
figure this out!

Daniel.

> -----Original Message-----
> From: Daniel Perry [mailto:[EMAIL PROTECTED]
> Sent: 07 December 2004 15:35
> To: OJB Users List
> Subject: Circular criteria
>
>
> 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]
>
>


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

Reply via email to