Howdy!

I have a very simple Many to One relationship

class InterviewGroup
  include DataMapper::Resource

  property :id, Serial
  has n, :interviews
end

class Interview
  include DataMapper::Resource

  property :id, Serial
  belongs_to :interview_group
  belongs_to :person
end

The problem is when I destroy an Interview, it deletes the parent 
InterviewGroup. Originally we had a :constraint => :destroy on 
InterviewGroup#interviews, removing the constraint still results in the 
InterviewGroup being destroyed. The odd thing is the related Person is not 
destroyed.

How would I go about fixing this so deleting an Interview will not destroy 
the Group?

Thanks!

-- 
You received this message because you are subscribed to the Google Groups 
"DataMapper" group.
To view this discussion on the web visit 
https://groups.google.com/d/msg/datamapper/-/ON-DKBy5s6gJ.
To post to this group, send email to datamapper@googlegroups.com.
To unsubscribe from this group, send email to 
datamapper+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/datamapper?hl=en.

Reply via email to