Added handling of ReferenceColumns for inserts and updates (to use whole objects insted of id's for foreign key relations)