1
0
mirror of synced 2025-03-22 07:53:49 +03:00

Reorder paragraph and fix note.

This commit is contained in:
Benjamin Eberlei 2011-06-12 23:26:54 +02:00
parent d8f9c5380a
commit c187862e4f

View File

@ -945,14 +945,6 @@ entities:
// ...
}
**NOTE** Why are many-to-many associations less common? Because
frequently you want to associate additional attributes with an
association, in which case you introduce an association class.
Consequently, the direct many-to-many association disappears and is
replaced by one-to-many/many-to-one associations between the 3
participating classes.
Generated MySQL Schema:
.. code-block:: sql
@ -973,6 +965,15 @@ Generated MySQL Schema:
ALTER TABLE users_groups ADD FOREIGN KEY (user_id) REFERENCES User(id);
ALTER TABLE users_groups ADD FOREIGN KEY (group_id) REFERENCES Group(id);
.. note::
Why are many-to-many associations less common? Because
frequently you want to associate additional attributes with an
association, in which case you introduce an association class.
Consequently, the direct many-to-many association disappears and is
replaced by one-to-many/many-to-one associations between the 3
participating classes.
Many-To-Many, Bidirectional
---------------------------