Did you check out the InSubQueryQualifier available from my web page: http://www.bernard-web.com/pierre ?

It will soon be folded in my future open source project: Houdah Frameworks

Pierre


On Jul 9, 2007, at 1:19 PM, Miguel Arroz wrote:

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      (Webobjects-dev@lists.apple.com)
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/webobjects-dev/arroz% 40guiamac.com

This email sent to [EMAIL PROTECTED]

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      (Webobjects-dev@lists.apple.com)
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/webobjects-dev/webobjects- lists%40houdah.com

This email sent to [EMAIL PROTECTED]

- - -
Houdah Software s. à r. l.
http://www.houdah.com

HoudahGeo: One-stop photo geocoding
HoudahSpot: Powerful Spotlight frontend



_______________________________________________
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list      (Webobjects-dev@lists.apple.com)
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/webobjects-dev/archive%40mail-archive.com

This email sent to [EMAIL PROTECTED]

Reply via email to