Say if I have an entity Fragment
, it has an attribute 'text' which is a string, I want to query the list of Fragment
whose text
is of length 5:
[NSPredicate predicateWithFormat:@"position == %@ AND text.length == %d", pos, 5];
It does not work (ie returns no result), but if I remove text.length in the query it works and I'm certain that there are texts of length 5, so what do I need to change it to?
Thanks!
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…