Support associations using embedded and URI representations dynamically, change belongsTo and hasMany to make class type optional