Doctrine 2 - ORM
  1. Doctrine 2 - ORM
  2. DDC-3028

[GH-978] [DDC-2987] Enable empty prefixes for inlined embeddable

    Details

    • Type: Bug Bug
    • Status: Resolved
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 2.5
    • Component/s: None
    • Security Level: All
    • Labels:
      None

      Description

      This issue is created automatically through a Github pull request on behalf of AntonStoeckl:

      Url: https://github.com/doctrine/doctrine2/pull/978

      Message:

      This fixes DDC-2987

      This makes it possible to map a field from an embeddable to a database field with the same name, without any prefix added.

      Example:

      • an embeddable object "Id" with a property "id"
      • per default this would map inline to id_id
      • supplying null or '' as columnPrefix does not work due to the ! empty() check
      • with my little change, if columnPrefix : false is supplied in the mapping config this will now map to a db column "id"

      To build Ids as ValueObjects is a very common approach in DDD, so ihmo this is a must have.

        Activity

        Hide
        Doctrine Bot added a comment -

        A related Github Pull-Request [GH-978] was closed:
        https://github.com/doctrine/doctrine2/pull/978

        Show
        Doctrine Bot added a comment - A related Github Pull-Request [GH-978] was closed: https://github.com/doctrine/doctrine2/pull/978
        Show
        Guilherme Blanco added a comment - Merged: https://github.com/doctrine/doctrine2/commit/383604d4b804017248e10bd7ae8489af4185e9e8

          People

          • Assignee:
            Guilherme Blanco
            Reporter:
            Doctrine Bot
          • Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved: