DDC-3028: [GH-978] [DDC-2987] Enable empty prefixes for inlined embeddable #3759

Closed
opened 2026-01-22 14:27:37 +01:00 by admin · 3 comments
Owner

Originally created by @doctrinebot on GitHub (Mar 13, 2014).

Originally assigned to: @guilhermeblanco on GitHub.

Jira issue originally created by user @doctrinebot:

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.

Originally created by @doctrinebot on GitHub (Mar 13, 2014). Originally assigned to: @guilhermeblanco on GitHub. Jira issue originally created by user @doctrinebot: 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](http://www.doctrine-project.org/jira/browse/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.
admin added the Bug label 2026-01-22 14:27:37 +01:00
admin closed this issue 2026-01-22 14:27:37 +01:00
Author
Owner

@doctrinebot commented on GitHub (Mar 16, 2014):

Comment created by @doctrinebot:

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

@doctrinebot commented on GitHub (Mar 16, 2014): Comment created by @doctrinebot: A related Github Pull-Request [GH-978] was closed: https://github.com/doctrine/doctrine2/pull/978
Author
Owner

@doctrinebot commented on GitHub (Mar 16, 2014):

Comment created by @guilhermeblanco:

Merged: 383604d4b8

@doctrinebot commented on GitHub (Mar 16, 2014): Comment created by @guilhermeblanco: Merged: https://github.com/doctrine/doctrine2/commit/383604d4b804017248e10bd7ae8489af4185e9e8
Author
Owner

@doctrinebot commented on GitHub (Mar 16, 2014):

Issue was closed with resolution "Fixed"

@doctrinebot commented on GitHub (Mar 16, 2014): Issue was closed with resolution "Fixed"
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: doctrine/archived-orm#3759