This content has been marked as final.
Show 2 replies
-
1. Re: Seam-gen generated EntityQueries not respecting RESTRICTIONS
fup Aug 25, 2009 9:43 AM (in response to burnsjc)A restriction is ignored if the expression resolves to null (or empty string). Perhaps #{usersList.users.userName} is resolved to null ?
-
2. Re: Seam-gen generated EntityQueries not respecting RESTRICTIONS
burnsjc Aug 25, 2009 10:31 PM (in response to burnsjc)Good to know! First I have to apologize that I forgot to include in my previous post that this was on JBoss 5.0.1 and Seam 2.1.2.
I ran a test using:
UsersList ul = new UsersList(); ul.setEjbql("select users from Users users where users.userName='" + credentials.getUsername() + "'");
And the return results worked as expected. So it seems that changing the Users instance that's created as part of UsersList doesn't update the Restrictions string (once it's created during UsersList creation). Odd, I would expect it update based on the JavaDoc, but that's okay.
The manually setting the EJBQL solution works for me, just wanted to follow up in case this shows up in someone's Google search. :)