handling has many and has one relations (embedded relations)