FROM : Jesse Grosjean
DATE : Thu Jun 08 21:41:59 2006
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
DATE : Thu Jun 08 21:41:59 2006
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
| Related mails | Author | Date |
|---|---|---|
| No related mails found. | ||






Cocoa mail archive

