fixed issue where foreign key keys in map to many were being stored as embedded entities