2 Replies Latest reply on Jan 8, 2009 5:17 PM by Nicolas Bielza

    Value Expressions in EntityQuery's ejbql

    Scott Olcott Newbie

      In seam 2.0 I was able to put Value Expressions in the EntityQuery's ejbql directly.  For example:



      ejbql="from User user where user.role = #{testRole}"



      When I upgraded to 2.1 this starts failing.  It seems by the time the hql query is created #{testRole} in the ejbql is just the toString instead of the actual testRole object.  I could move the restriction to the EntityQuery's restrictions and it would work fine.  However, as far as I know the restrictions on EntityQuery do not support or clauses.  Previously I was putting most of me restrictions in the ejbql because I was using or clauses.