Embed
(Created page with "Embed (e) at an association end is best explained as "in which table is the foreign key placed" This is often self-evident: One-to-Many - foreign key will go in many end. Man...")
 
No edit summary
Line 5: Line 5:
One-to-One - This is where Embed-flag becomes important, because it is optional where to put the foreign key.
One-to-One - This is where Embed-flag becomes important, because it is optional where to put the foreign key.
If you do not know what end to pick - you can just pick any of them. But as you grow more experienced you might want to have the ability to control this.
If you do not know what end to pick - you can just pick any of them. But as you grow more experienced you might want to have the ability to control this.
If you set Embed=false on the many-end you prevent the framework from doing the reasonable thing - the framework will then assume you have a good reason and create an implicit association class where it can but the keys.

Revision as of 09:25, 9 June 2020

Embed (e) at an association end is best explained as "in which table is the foreign key placed" This is often self-evident:

One-to-Many - foreign key will go in many end. Many-to-Many - foreign key will go into link-class(possibly implicit) One-to-One - This is where Embed-flag becomes important, because it is optional where to put the foreign key. If you do not know what end to pick - you can just pick any of them. But as you grow more experienced you might want to have the ability to control this.

If you set Embed=false on the many-end you prevent the framework from doing the reasonable thing - the framework will then assume you have a good reason and create an implicit association class where it can but the keys.

This page was edited 90 days ago on 02/10/2024. What links here