• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
ERXQualifierInSubquery problem
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

ERXQualifierInSubquery problem


  • Subject: ERXQualifierInSubquery problem
  • From: Miguel Arroz <email@hidden>
  • Date: Mon, 9 Jul 2007 00:27:15 +0100

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:
This email sent to email@hidden


  • Follow-Ups:
    • [SOLVED] ERXQualifierInSubquery problem
      • From: Miguel Arroz <email@hidden>
  • Prev by Date: Re: WebObjects documentation site
  • Next by Date: Re: [Wonder-disc] WebObjects documentation site
  • Previous by thread: Re: Webobjects-dev Digest, Vol 4, Issue 520
  • Next by thread: [SOLVED] ERXQualifierInSubquery problem
  • Index(es):
    • Date
    • Thread