I'm currentky rewriting my application to use ORM, but while I already understood most of the principles I solve this issue.
I have 2 models: "Customer" and "Customer_Company". Which are related in a one-to-one relation. which I believe is set up right. However when saving the customer even though the company is created and the customer is saved, the relation isn't saved in the database.