Re: Little help with a qualifier
Re: Little help with a qualifier
- Subject: Re: Little help with a qualifier
- From: Paul Hoadley <email@hidden>
- Date: Tue, 14 Jul 2009 20:23:25 +0930
Hi Gustavo,
On 14/07/2009, at 5:14 PM, Gustavo Pizano wrote:
Ok this is what I did. but is not working, I have an error in the
generated sql or somehting.. becuase it says
java.lang.IllegalStateException: sqlStringForKeyValueQualifier:
attempt to generate SQL for
er.extensions.qualifiers.ERXKeyValueQualifier (name = 'Gustavo')
failed because attribute identified by key 'name' was not reachable
from from entity 'WGxTS'
I guess is becaus Im trying to search in the wrong place..
It's not an error in the generated SQL, it's an error in your
qualifiers. To be honest, I can't follow your model, but EOF is
telling you the problem: you've tried to qualify an entity on a key
that doesn't exist in that entity. Specifically, 'WGxTS' has no key
called 'name'.
As an aside, earlier you wrote:
but so far what I have from the user is the name... so I will need
to get the userID something like toUser.NAME.eq(name).
Yet here:
EOQualifier tsQual = new
ERXExistsQualifier(ERXQ.equals(USER.NAME_KEY,
((Session)session()).authenticatedUser().name()),
TRANSLATIONSET.TO_USER_KEY);
Don't you have the User? What's Session.authenticatedUser() returning
if it's not a User?
--
Paul.
w http://logicsquad.net/
h http://paul.hoadley.name/
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden