• 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
coredata sql predicate behavior for != number comparisons
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

coredata sql predicate behavior for != number comparisons


  • Subject: coredata sql predicate behavior for != number comparisons
  • From: Jesse Grosjean <email@hidden>
  • Date: Thu, 8 Jun 2006 15:41:59 -0400

I'm seeing some buggy behavior for != queries against null values. My setup is I have a SQL store, an entry entity, and that entry has a to one relationship to an entryData entity. I'm trying to query against a number value in the entryData, and so my query looks like this:

	entryData.numberAttribbute != 2

This query works properly in all caseswhere numberAttribute is not null in the queried entryDatas. But it doesn't always work correctly when the numberAttribute = null. When the context is fresh it does work, the query entryData.numberAttribbute != 2 will match and return entryData's whose numberAttribute = null.

But if I save the context, close it, and then reopen it those entryData's no longer show up as matches. The only way that I can get them to show up as matches is if I dirty that entryData in the context by changing some attribute value (I don't need to change the numberAttribute, any attribute change will fix the problem)

My guess is that the problem is somehow related to the fact that I'm querying across a relationship, that seems to cause problems in some situations. Has anyone else run into this? Have a workaround suggestion?

Thanks,
Jesse
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden


  • Prev by Date: NSKeyedUnarchiver Exception, No Idea
  • Next by Date: tracing information on mach ports leaks?
  • Previous by thread: NSKeyedUnarchiver Exception, No Idea
  • Next by thread: tracing information on mach ports leaks?
  • Index(es):
    • Date
    • Thread