Reputation: 434
I have the following scenario:
One Dose has one or more Nutrients and when the dose is deleted I would like that the nutrients stay in database. Is there any annotation that allows to do that?
Thank in advance!
Upvotes: 0
Views: 46
Reputation: 81539
If you delete a Dose
object, only the links get invalidated, but the Nutrient
classes that belong to it stay in the database when you call dose.deleteFromRealm()
.
So basically that's actually the default use-case.
Upvotes: 2