You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I have a document that has the property merchant with the name ("m") and embeds a document with id that referes to a Merchant in simple = true
When i am filtering my field name is always ID -- to fix it i added this:
# Sonata/DoctrineMongoDBAdminBundle/Filter/Filter.php
public function getFieldName()
{
$fieldName = $this->getOption('field_name');
if (!$fieldName) {
throw new \RuntimeException(sprintf('The option `field_name` must be set for field: `%s`', $this->getName()));
}
foreach($this->getOption('parent_association_mappings') as $map) {
if(!empty($map['name'])) {
$fieldName = $map['name'] . "." . $fieldName;
} elseif (!empty($map['fieldName'])) {
$fieldName = $map['fieldName'] . $fieldName;
}
}
return $fieldName;
}
Not sure if is the best approach or if is going to break more stuff -- on DataGridBuilder there is a function "fixFieldDescription" , i could set the option field name there but wanted to make sure what is the right approach to this.
The text was updated successfully, but these errors were encountered:
I have a document that has the property merchant with the name ("m") and embeds a document with id that referes to a Merchant in simple = true
When i am filtering my field name is always ID -- to fix it i added this:
Not sure if is the best approach or if is going to break more stuff -- on DataGridBuilder there is a function "fixFieldDescription" , i could set the option field name there but wanted to make sure what is the right approach to this.
The text was updated successfully, but these errors were encountered: