• 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
Re: EOQualifier-relations
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: EOQualifier-relations


  • Subject: Re: EOQualifier-relations
  • From: Chuck Hill <email@hidden>
  • Date: Thu, 28 Sep 2006 12:00:49 -0700

Hi Frank,

On Sep 27, 2006, at 11:59 PM, Frank Stock wrote:

I have made a construction with EOQualifier here is my QualifierString:

(languagesavedtemplate.language=%@) and ((name caseInsensitiveLike % @) OR
(languagesavedtemplate.savedtemplatedescription caseInsensitiveLike %@)) AND
(usersavedtemplate.user=%@) AND
(usersavedtemplate.user.usernode.node=savedtemplatenode.node) <-------------


and this is the SQL-statment that is generated:

"SELECT t0."approvaluser_id", t0."ctime", t0."mtime", t0."name", t0."ordercomment",
t0."orderref", t0."previewfile", t0."savedtemplate_id", t0."status", t0."template_id",
t0."thumb", t0."user_id" FROM "savedtemplate" t0, "language_savedtemplate" T2, "user_savedtemplate" T1
WHERE ((1=1) <-----------------
AND T1."user_id" = 1000000 AND (t0."name" LIKE '%test%' COLLATE INFORMATION_SCHEMA.CASE_INSENSITIVE OR
T2."savedtemplatedescription" LIKE '%test%' COLLATE INFORMATION_SCHEMA.CASE_INSENSITIVE) AND
T2."language_id" = 1000000) AND t0."savedtemplate_id" = T2."savetemplate_id" AND
t0."savedtemplate_id" = T1."savedtemplate_id" ORDER BY t0."name" COLLATE INFORMATION_SCHEMA.CASE_INSENSITIVE ASC"


Why is this not working and is:
			(usersavedtemplate.user.usernode.node=savedtemplatenode.node)
generating:
			(1=1)
Is it possible to work with relations that way?

I have seen that before, but I don't recall the cause. It _should_ work, if (usersavedtemplate.user.usernode.node=savedtemplatenode.node) is getting translated into a EOKeyComparisonQualifier. One possibility is that your model is not as you think it should be. It may be that EOF is determining that both sides of (usersavedtemplate.user.usernode.node=savedtemplatenode.node) refer to the same column in the same row that it is optimizing it to 1==1.


Chuck

--

Practical WebObjects - for developers who want to increase their overall knowledge of WebObjects or who are trying to solve specific problems. http://www.global-village.net/products/practical_webobjects





_______________________________________________
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


References: 
 >EOQualifier-relations (From: Frank Stock <email@hidden>)

  • Prev by Date: Re: Duplicate entry [ was addObjectsToBothSide... not really both side]
  • Next by Date: Unable to release locks held by a deallocated EOEditingContext.
  • Previous by thread: EOQualifier-relations
  • Next by thread: Unable to release locks held by a deallocated EOEditingContext.
  • Index(es):
    • Date
    • Thread