I have an aggregate with 3 children models class Aggregate one_to_one :first_children one_to_one :second_children one_to_one :third_children
nested_attributes :first_children nested_attributes :second_children nested_attributes :third_children end class FirstChildren many_to_one :aggregate end class SecondChildren many_to_one :aggregate end class ThirdChildren many_to_one :aggregate end I'm using fields for and: - in the new action when I set @aggregate.first_children = FirstChildren.new I get the error *"does not have a primary key"* - in the new action when I create a @first_children = FirstChildren.new and use it in the partial view with fields for I don't get the previous error but I get a constraint error from Postgres telling me that the column aggregate_id from the FirstChildren, SecondChildren and ThirdChildren was not se The question is: how can I create this object with it's children? Before posting here I took a look in the group and google but unfortunately I could not come up with any solution. Thanks in advance. * * -- You received this message because you are subscribed to the Google Groups "sequel-talk" group. To view this discussion on the web visit https://groups.google.com/d/msg/sequel-talk/-/Rw8ncynnSXwJ. 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.
