Hello there,

I have an n:m table with two primary keys. In my tests I am populating the 
db manually by creating new rows with the a sequel model's create method. 
To be able to set primary keys I am unrestricting the model on a class 
level like 

MyModel.strict_param_setting = false

Setting the primary keys in a create statement 

MyModel

will result in an sql statement which omits the primary key names and 
values completely resulting in something like: 

Mysql2::Error: Field 'pk_1' doesn't have a default value: INSERT INTO 
`my_model` (`some_field`) VALUES (50.0)

What am I missing? Thanks!

Nicky

-- 
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/68dac763-7285-4f47-accc-f14fdfd0a8f1%40googlegroups.com.

Reply via email to