Doctrine 1
  1. Doctrine 1
  2. DC-609

Symfony doctrine doesnt save an M:M table if one of the tables is in a 1:1 relationship with another table

    Details

    • Type: Bug Bug
    • Status: Open
    • Priority: Major Major
    • Resolution: Unresolved
    • Affects Version/s: 1.2.1
    • Fix Version/s: None
    • Component/s: None
    • Labels:
      None
    • Environment:
      MAC, Symfony PHP framework

      Description

      Symfony doctrine doesnt save an M:M table if one of the tables is in a 1:1 relationship with another table. Refer to Screen.png for ER diagram.

      I have included the schema files as attachments.

      You will notice in Screen shot 2010-03-31 at 3.30.56 AM.png, an item is selected in "Amenities list". When the form is submitted, everything saves in the db except for the item in the "Amenities list" (Screen shot 2010-03-31 at 3.31.37 AM.png)

      1. Ad.yml
        2 kB
        Chris F
      2. Amenity.yml
        0.3 kB
        Chris F
      3. Housing.yml
        1.0 kB
        Chris F
      4. HousingAmenity.yml
        0.5 kB
        Chris F
      1. Screen.png
        42 kB
      2. Screen shot 2010-03-31 at 3.30.56 AM.png
        26 kB
      3. Screen shot 2010-03-31 at 3.31.37 AM.png
        28 kB

        Activity

        Hide
        Chris F added a comment -

        The problem could be because i am embedding a form that has a M:M relation with another table.

        Which is a similar issue to http://trac.symfony-project.org/ticket/5867

        Many have mentioned to override the saveEmbeddedForms() function inside BaseFormDoctrine.

        The patch at: http://trac.symfony-project.org/ticket/5867 doesnt work. How can we fix this?

        Show
        Chris F added a comment - The problem could be because i am embedding a form that has a M:M relation with another table. Which is a similar issue to http://trac.symfony-project.org/ticket/5867 Many have mentioned to override the saveEmbeddedForms() function inside BaseFormDoctrine. The patch at: http://trac.symfony-project.org/ticket/5867 doesnt work. How can we fix this?

          People

          • Assignee:
            Jonathan H. Wage
            Reporter:
            Chris F
          • Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

            • Created:
              Updated: