Dirty tracking for embedded belongsTo

Based on the work done for #260 I tried to fix dirty tracking for belongsTo.