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...")
 
(Updated Edited template to July 12, 2025.)
 
(8 intermediate revisions by 3 users not shown)
Line 1: Line 1:
Embed (e) at an association end is best explained as "in which table is the foreign key placed" This is often self-evident:
<message>Write the content here to display this box</message>
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 ends.
* 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. However, as you grow more experienced, you might want to have the ability to control this.


One-to-Many - foreign key will go in many end.
If you set <code>Embed=false</code> 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 put the keys.
Many-to-Many - foreign key will go into link-class(possibly implicit)
[[Category:Associations]]
One-to-One - This is where Embed-flag becomes important, because it is optional where to put the foreign key.
{{Edited|July|12|2025}}
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.

Latest revision as of 05:49, 20 January 2025

This page was created by Henrik on 2018-01-16. Last edited by Edgar on 2025-01-20.

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 ends.
  • 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. However, 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 put the keys.

MDriven Chat

How would you like to chat today?

Setting up your conversation…

This may take a few moments