cayleygraph / cayleygraph/cayley
Nested object is not removed when the parent object is removed
- Dominant language
- Go
- Stars
- 15.1k
- Forks
- 1.2k
- PR merge metrics
- No merged PRs in 30d
Description
Here is the source to illustrate the problem: https://gist.github.com/denisvmedia/1079e1f55c0eda7c2bd63368b345fd21
**Description**
In my code I sometimes need to remove an object that has a nested object. The problem is that the quads from the nested object remain orphaned in the database.
**Steps to reproduce the issue:**
1. Compile and run [this example](https://gist.github.com/denisvmedia/1079e1f55c0eda7c2bd63368b345fd21).
**Received results:**
```
quads:
-- ->
-- -> "Cluster1"
_:n7235784696260549346 -- -> "127.0.0.1"
_:n7235784696260549346 -- -> "1234"
```
**Expected results:**
```
quads:
-- ->
-- -> "Cluster1"
```
**Cayley and DB backend versions:**
```
github.com/boltdb/bolt v1.3.1
github.com/cayleygraph/cayley v0.7.5
```
Contributor guide
Research direction
Compile and run the linked reproduction against the stated Cayley and Bolt versions, then trace the object-removal behavior that leaves the nested object's quads behind. Compare the observed quads with the expected output and verify that removing the parent no longer leaves orphaned nested data.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- go
- Domain
- backend, databases
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100