How to fetch CKRecords without parent record?

169 views Asked by At

I need to check which CKRecords in CloudKit container don't have parent record yet. How I can fetch only records that do not have parent yet? I've tried NSPredicate, but getting an error "Unknown field 'parent'".

enter image description here

1

There are 1 answers

1
Stamenkovski On

You can’t achieve this with a simple query, but you can filter fetched records where Share property is nil.