How is foreign key mapped in domain entity? Is it something that Mendix takes care of it on its own? If not then how do we know if the right primary key of an entity is associated with the right foreign key of another entity?
Mendix handles this for you when you create associations between entities. No need for you to worry about key mapping in the database