I am trying to execute a multiple nested PB query against an object
model such as follows:

[A] <-1--n-> [B] <-1--1-> [C] -1--1-> [D]

Criteria criteria = new Criteria();
criteria.addEqualTo("bCollection.c.d.value", "constant");
Query query = new QueryByCriteria(A.class, criteria);
Collection aCollection = Broker.getCollectionByQuery(query);
...

This should produce the SQL such as 

SELECT A.field
FROM A A0 INNER JOIN B A1
ON A0.fk = A1.pk
INNER JOIN C A2
ON A1.fk = A2.pk
INNER JOIN D A3
ON A2.fk = A3.pk
WHERE A3.value = 'constant'

But instead it produces only a single join

SELECT A.field
FROM A A0 INNER JOIN B A1
ON A0.fk = A1.pk
WHERE value = 'constant'

My question is if this type of multiple nested queries is supported?  Or
is only a single level of nesting supported?  How would you suggest
working around this problem?

Wallace J Gelhar
Facilities Planning & Management
Computer Information Systems
[EMAIL PROTECTED]
(715) 836-3411


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

Reply via email to