realm / realm-java

Realm is a mobile database: a replacement for SQLite & ORMs
http://realm.io
Apache License 2.0
11.47k stars 1.75k forks source link

Support for cascading deletes #1104

Open cmelchior opened 9 years ago

cmelchior commented 9 years ago

It should be possible to delete linked objects as well using some defined policy.

Suggestion 1: Possible policies:

Suggestion 2: Try to provide the same semantics as the GC, i.e. root objects and strong/weak references. Once an object no longer has any references it is deleted.

Cocoa issue: https://github.com/realm/realm-cocoa/issues/1186

carloseduardosx commented 8 years ago

+1

maksimusenko commented 8 years ago

+1

dawidhyzy commented 8 years ago

+1

Zhuinden commented 8 years ago

Suggestion 2: Try to provide the same semantics as the GC, i.e. root objects and strong/weak references. Once an object no longer has any references it is deleted.

This reminds me of JPA's orphanRemoval=true.

michaelpace commented 8 years ago

+1

ashuBold commented 8 years ago

+1

TheBogueRat commented 8 years ago

+1

pofit commented 8 years ago

+1

CaliosD commented 8 years ago

+1.

Zeyad-37 commented 8 years ago

+1

fishfisher commented 8 years ago

+1

timothycosta commented 8 years ago

+1

angad737 commented 8 years ago

+1

Zhuinden commented 8 years ago

Man, these +1s are adding too much noise, they don't add any value to the conversation and they could just use the upvote on the top post...

The current answer is provided here: https://github.com/realm/realm-java/issues/2717#issuecomment-255973863

Is there a chance this can get locked like https://github.com/realm/realm-java/issues/575 ?

kneth commented 8 years ago

And it depends on https://github.com/realm/realm-core/issues/746

roberhofer commented 6 years ago

Reflected in AHA under: https://realmio.aha.io/requirements/PROD-13-2 As Kenneth outlined, this has a dependency on core support, which is in the works. ETA ~Q4-18.