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!