The code given below works
Query query = session.createQuery(findTokens);
Date d1 =Date.valueOf("2005-03-10");
query.setDate( "processInstanceStart", d1);
query.setString( "actorId", actorId );
but when i specify this with criteria it fails
classCriteria crit = session.createCriteria(TokenImpl.class );
Criterion userEq=Expression.eq("actorId",actorId);
crit.add(userEq);
Date d1 =Date.valueOf("2005-03-10");
Criterion processInstanceStartEq=Expression.eq("processInstance.start",d1);
crit.add(processInstanceStartEq);
the query goes like this
private static final String findTokens =
"select t " +
"from t in class org.jbpm.model.execution.impl.TokenImpl " +
"where t.processInstance.start >:processInstanceStart " +
" and t.actorId = :actorId ";
is there any thing wrong with my criteria expression
thanks
|