DDC-421: Add getFieldValue on ClassMetadata class #524

Open
opened 2026-01-22 12:41:23 +01:00 by admin · 0 comments
Owner

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

Originally assigned to: @beberlei on GitHub.

Jira issue originally created by user seldaek:

I would like the attached patch to be applied since it allows you to use the ClassMetadata in a much more obvious and consistent way.

i.e. it allows you to do :
{quote}
$this->_class->setFieldValue($entity, $field, 35);
$this->_class->getFieldValue($entity, $field);
{quote}

instead of the current:
{quote}
$this->_class->setFieldValue($entity, $field, 35);
$this->_class->getReflectionProperty($field)->getValue($entity);
{quote}

I am using the new style already in the NestedSet extension so it would be good if you could apply it fairly quickly if you agree.

Originally created by @doctrinebot on GitHub (Mar 13, 2010). Originally assigned to: @beberlei on GitHub. Jira issue originally created by user seldaek: I would like the attached patch to be applied since it allows you to use the ClassMetadata in a much more obvious and consistent way. i.e. it allows you to do : {quote} $this->_class->setFieldValue($entity, $field, 35); $this->_class->getFieldValue($entity, $field); {quote} instead of the current: {quote} $this->_class->setFieldValue($entity, $field, 35); $this->_class->getReflectionProperty($field)->getValue($entity); {quote} I am using the new style already in the NestedSet extension so it would be good if you could apply it fairly quickly if you agree.
admin added the Improvement label 2026-01-22 12:41:23 +01:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: doctrine/archived-orm#524