[SOLVED] ERXQualifierInSubquery problem
[SOLVED] ERXQualifierInSubquery problem
- Subject: [SOLVED] ERXQualifierInSubquery problem
- From: Miguel Arroz <email@hidden>
- Date: Mon, 9 Jul 2007 12:19:16 +0100
Hi!
Ok, I fixed the bug, it wasn't in fact converting from
relationship names to database column names. I will setup Wonder in
Eclipse today, and submit a patch.
Yours
Miguel Arroz
On 2007/07/09, at 00:27, Miguel Arroz wrote:
Hi!
I'm trying to use the ERXQualifierInSubquery to solve my complex
query problem I described earlier. I almost could make it work, but
I'm having a strange problem: the inner query cannot find
relationships for the entity.
If I have the entity MyEntity with a toOne relationship to a
YourEntity entity, called "yourEntity", that uses the
"yourEntityID" foreign key, and do this:
EOQualifier qualifier = EOQualifier.qualifierWithQualifierFormat
("yourEntity = %@", args);
ERXQualifierInSubquery qualifier2 = new ERXQualifierInSubquery
( qualifier, "MyEntity", null, whatever );
When WO tries to generate the SQL, I get an error that says
"yourEntity" is not reachable from MyEntity. If, however, I do:
EOQualifier qualifier = EOQualifier.qualifierWithQualifierFormat
("yourEntityID = %@", args);
It works. Apparently, the SQL generation is not substituting the
relations names for their foreign key table column names. This
becomes a major problem because I need to do stuff like
"yourEntity.somethingElse.yetAnotherThing = %s" and it obviously
doesn't work.
I never did any SQL generating code in WO, but by looking at the
qualifier code, everything seems to be working. Does anyone have
any ideia of what may be the problem?
Yours
Miguel Arroz
Miguel Arroz
http://www.terminalapp.net
http://www.ipragma.com
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
40guiamac.com
This email sent to email@hidden
Miguel Arroz
http://www.terminalapp.net
http://www.ipragma.com
_______________________________________________
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