Fix ignored ids for belongsToMany relations

Fix ids ignored by marshaller for belongsToMany relations.
I think there is a good change for optimization here. Instead of doing 2 queries per item we could do a find('all') with those entities having an id present.