I'm having a problem removing an object via assocation remove_, and
wanted to make sure I'm doing things properly.

Here are how my models are declared:

class A < Sequel::Model(:a)
  set_primary_key :a_id
  :one_to_many :bobjects, :class =>:B, :key =>:b_id, :primary_key
=>:a_id
end

class B < Sequel::Model(:b)
  set_primary_key :b_id, :c_id
end

When I call:

a = A[1]
b = B[1,2]

a.remove_b(b)   # this results in update nil/NULL is not allowed for
the :b_id column

I tried setting b.raise_on_typecast_failure=false before calling
remove but it doesn't remove the entry at all.  I wanted to make sure
I'm using this method properly.  Thoughts?

-- 
You received this message because you are subscribed to the Google Groups 
"sequel-talk" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/sequel-talk?hl=en.

Reply via email to