Replies: 3 comments 1 reply
-
|
@DannyBen any updates by any chance? Curious how you ended working around this? Thanks in advance for sharing. |
Beta Was this translation helpful? Give feedback.
0 replies
-
|
I don;t recall. Looking at my code I see nothing that handles this other than a function that deletes orphan objects... |
Beta Was this translation helpful? Give feedback.
0 replies
-
|
Maybe we can use Ohm::Callbacks. By defining a class Parent < Ohm::Model
include Ohm::Callbacks
attribute :name
collection :children, :Child
def before_delete
children.each do |child|
child.delete
end
end
end |
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
I was under the assumptions that deleting a parent object, deletes any object that references it.
The README only mentions this propagation in the
tracksection.I was expecting the below test to work - am I doing something wrong, or do I need to delete the orphan objects manually?
Beta Was this translation helpful? Give feedback.
All reactions