Skip to content

Cascade delate when using backlink relationship #2553

Discussion options

You must be logged in to vote

Hi @vardansargsyan92,

regarding cascading deletes there is no difference between forward links and backward links.
They don't automatically do cascading deletes unless you use EmbeddedObject as you already expected.

The reason behind this is that any JobSummaryItem in the IQueryable<JobSummaryItem> JobSummaryItems in your JobwalkItem could also be linked in any other RealmObject. We therefore cannot delete them safely.
Even if they weren't used anywhere else they are designed to not be deleted since they could be used somewhere else in the future.

The idea of having an object belonging to exactly just one other object and if it (or rather: the link to it) gets deleted there the object can…

Replies: 1 comment 4 replies

Comment options

You must be logged in to vote
4 replies
@vardansargsyan92
Comment options

@DominicFrei
Comment options

@vardansargsyan92
Comment options

@DominicFrei
Comment options

Answer selected by nirinchev
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants