Completed foreign keys and identities mapping for many to many entities