| criteria builder missing a condition [message #778455] |
Thu, 12 January 2012 09:29  |
Tom Eugelink Messages: 801 Registered: July 2009 |
Senior Member |
|
|
I'm trying to create a where clause resembling: "stage = ? and approvedby is not null"
This is the builder code:
lCriteriaQuery = lCriteriaQuery.select(lBuyorderRoot).where(
lCriteriaBuilder.and(
lCriteriaBuilder.equal( lBuyorderRoot.get(Buyorder.STAGE_FIELD_ID), Buyorder.STAGE_ENTERED),
lCriteriaBuilder.isNotNull( lBuyorderRoot.get(Buyorder.APPROVEDBYEMPLOYEE_FIELD_ID) )
)
);
This is the generated SQL:
SELECT ... FROM buyorder WHERE (stage = ?)
Why is the approvedby missing?
|
|
|
|
|
|
Powered by
FUDForum. Page generated in 0.01643 seconds