Hello! I have a one_to_one relation between an order and transaction (`one_to_one :transaction` inside `Order` class). In addition I have a FK constraint on `order_id` on `transactions` table. Assigning the transaction with `order.transaction = Transaction.new(attrs)` works just fine, but then when I (incorrectly) try to add another one I'm getting a `NotNullConstraintViolation` on `order_id` column. Is there a reason for this and not raising `UniqueConstraintViolation`?
Notice that this only happens if I use `order.transaction = Transaction.new(attrs)` setter, if I instead do `Transaction..create(attrs.merge(order_id: order.id))` I get the correct error raised. -- You received this message because you are subscribed to the Google Groups "sequel-talk" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To view this discussion on the web visit https://groups.google.com/d/msgid/sequel-talk/3c654063-f2dd-4a5c-9b4c-3760f57d127dn%40googlegroups.com.
