swift - Is there way to get `invalidated` flag from `Results` object? -


i using realm swift.

i have object post has relation comments comment objects:

final class post: object {     var comments: list<comment> = list<comment>() } 

... , create results<comment> object transforming list<comment>:

let results = post.comments.filter(nspredicate(value: true)).sorted("creationdate") 

... , works until delete original post object.

when delete post object , call results.count, realm crash advice: important: if see error, please send log help@realm.io..

so understand why crashed how can handle situation when have results object , becomes invalid.

this looks bug in realm, being tracked https://github.com/realm/realm-cocoa/issues/3054. subscribe issue follow progress on fix.


Comments

Popular posts from this blog

how to insert data php javascript mysql with multiple array session 2 -

multithreading - Exception in Application constructor -

windows - CertCreateCertificateContext returns CRYPT_E_ASN1_BADTAG / 8009310b -