From c187862e4f276dee39142b262ff3d1800be67529 Mon Sep 17 00:00:00 2001 From: Benjamin Eberlei Date: Sun, 12 Jun 2011 23:26:54 +0200 Subject: [PATCH] Reorder paragraph and fix note. --- en/reference/association-mapping.rst | 17 +++++++++-------- 1 file changed, 9 insertions(+), 8 deletions(-) diff --git a/en/reference/association-mapping.rst b/en/reference/association-mapping.rst index 5a8c58855..a8e6690b6 100644 --- a/en/reference/association-mapping.rst +++ b/en/reference/association-mapping.rst @@ -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 ---------------------------