DDC-3390: [GH-1185] add a new method that return the mapped properties #4187

Closed
opened 2026-01-22 14:36:57 +01:00 by admin · 5 comments
Owner

Originally created by @doctrinebot on GitHub (Nov 12, 2014).

Originally assigned to: @beberlei on GitHub.

Jira issue originally created by user @doctrinebot:

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

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

Message:

There are some implementations that use the doctrine metadata to get the properties of a entity (DoctrineObject), and it currently uses the getFieldNames and getAssociationNames methods to retrieve and merge it.

Since the embeddables feature was added, that method will return more than one metadata for each embeddable property, and then the hydrator can never find the appropriate setter for that property.

This method allows some implementation to retrieve all mapped fields from an entity, something that can't be done using get_class_vars for example.

Of course this implementation could be done in the hydrator, but i don't think it is its responsibility to filter and merge data received from the ClassMetadata. Since you have methods to retrieve the metadata formatted as the database structure, you should also have methods to retrieve the information to the other side, in object structure.

Originally created by @doctrinebot on GitHub (Nov 12, 2014). Originally assigned to: @beberlei on GitHub. Jira issue originally created by user @doctrinebot: This issue is created automatically through a Github pull request on behalf of fabiocarneiro: Url: https://github.com/doctrine/doctrine2/pull/1185 Message: There are some implementations that use the doctrine metadata to get the properties of a entity (DoctrineObject), and it currently uses the getFieldNames and getAssociationNames methods to retrieve and merge it. Since the embeddables feature was added, that method will return more than one metadata for each embeddable property, and then the hydrator can never find the appropriate setter for that property. This method allows some implementation to retrieve all mapped fields from an entity, something that can't be done using get_class_vars for example. Of course this implementation could be done in the hydrator, but i don't think it is its responsibility to filter and merge data received from the ClassMetadata. Since you have methods to retrieve the metadata formatted as the database structure, you should also have methods to retrieve the information to the other side, in object structure.
admin added the BugDuplicate labels 2026-01-22 14:36:57 +01:00
admin closed this issue 2026-01-22 14:36:57 +01:00
Author
Owner

@doctrinebot commented on GitHub (Jan 24, 2015):

Comment created by @doctrinebot:

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

@doctrinebot commented on GitHub (Jan 24, 2015): Comment created by @doctrinebot: A related Github Pull-Request [GH-1185] was labeled: https://github.com/doctrine/doctrine2/pull/1185
Author
Owner

@doctrinebot commented on GitHub (Aug 31, 2015):

Comment created by @doctrinebot:

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

@doctrinebot commented on GitHub (Aug 31, 2015): Comment created by @doctrinebot: A related Github Pull-Request [GH-1185] was unlabeled: https://github.com/doctrine/doctrine2/pull/1185
Author
Owner

@doctrinebot commented on GitHub (Aug 31, 2015):

Comment created by @doctrinebot:

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

@doctrinebot commented on GitHub (Aug 31, 2015): Comment created by @doctrinebot: A related Github Pull-Request [GH-1185] was assigned: https://github.com/doctrine/doctrine2/pull/1185
Author
Owner

@doctrinebot commented on GitHub (Aug 31, 2015):

Comment created by @doctrinebot:

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

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

@malukenho commented on GitHub (Jan 12, 2017):

@Ocramius can be closed as per your comment.

The metadata API is being reworked by @guilhermeblanco, and introducing new interfaces now will just lead to bigger BC breaks later on

@malukenho commented on GitHub (Jan 12, 2017): @Ocramius can be closed as per your comment. > The metadata API is being reworked by @guilhermeblanco, and introducing new interfaces now will just lead to bigger BC breaks later on
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: doctrine/archived-orm#4187