I got an error from core-data that a value “” could not be parsed.
This value belonged to a non optional entity attribute of type double with 0 as default.
What can cause such data corruption?
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
I think the answer to your question “what could cause such data corruption” is “faulting”.
Core data will only fetch the attributes when it needs them. This is a feature, not a bug, as it helps manage memory and performance efficiently behind the scenes. However, if you use a construct returned by a core data fetch (such as an array with fetch results) and construct an XLM it is conceivable that the faults are not filled (i.e., Core Data does not go to the persistent store to fetch the faulted data automatically).
Your observation that everything is there once you explicitly call the relationship like in
children = entity.childrencorroborates this thesis.So -no, not access observers, but faulting is responsible for your data loss.