English 中文(简体)
使用非在关系中使用的先天化合物
原标题:NSPredicate compound using NOT in relationships

我有以下不符合预期的前提:

isHistoric == 0 AND (NOT ANY singleToMany.name ==[cd] "searchword")

我期待任何物体在他们单一的ToMany关系中 都有. 字的搜索名... 将不会出现在结果中...

如果我把这个翻到它头上,拿掉它——我只返回一个我不想使用它的结果![如果这有道理]意思是:

isHistoric == 0 AND (ANY singleToMany.name ==[cd] "searchword")

返回第一个前提示例中不想出现的一个结果。

有什么建议吗?

问题回答

尝试 :

isHistoric == 0 AND (NONE singleToMany.name ==[cd] "searchword")

DOCS 表示 < code> noone 相当于 NOT (ANY...) 。 注意括号的位置 。 因此, 以上应等于 :

isHistoric == 0 AND NOT (ANY singleToMany.name ==[cd] "searchword")
isHistoric == 0 AND singleToMany.name NOT LIKE [cd] "searchword"




相关问题
List Contents of Directory in a UITableView

I am trying to list the contents of Ringtones directory in a TableView, however, I am only getting the last file in the directory in ALL cells, instead of file per cell. This is my code: - (...

iPhone NSUserDefaults persistance difficulty

In my app i have a bunch of data i store in the NSUserdefaults. This information consists of an NSObject (Object1) with NSStrings and NSNumbers and also 2 instances of yet another object (Object2). ...

Writing a masked image to disk as a PNG file

Basically I m downloading images off of a webserver and then caching them to the disk, but before I do so I want to mask them. I m using the masking code everyone seems to point at which can be found ...

Resize UIImage with aspect ratio?

I m using this code to resize an image on the iPhone: CGRect screenRect = CGRectMake(0, 0, 320.0, 480.0); UIGraphicsBeginImageContext(screenRect.size); [value drawInRect:screenRect blendMode:...

Allowing interaction with a UIView under another UIView

Is there a simple way of allowing interaction with a button in a UIView that lies under another UIView - where there are no actual objects from the top UIView on top of the button? For instance, ...

热门标签