File tree Expand file tree Collapse file tree 1 file changed +2
-7
lines changed Expand file tree Collapse file tree 1 file changed +2
-7
lines changed Original file line number Diff line number Diff line change @@ -102,17 +102,12 @@ cast into a string and so must have a ``__toString()`` method.
102
102
can use anything supported by the
103
103
:doc: `PropertyAccessor component </components/property_access/introduction >`
104
104
105
- Usage sample::
105
+ For example, if the translations property is actually an associative array of
106
+ objects, each with a name property, then you could do this::
106
107
107
108
$builder->add('gender', 'entity', array(
108
109
'class' => 'MyBundle:Gender',
109
110
'property' => 'translations[en].name',
110
- 'query_builder' => function(EntityRepository $er) {
111
- return $er->createQueryBuilder('g')
112
- ->join('g.translations', 't', 'WITH', 't.locale = :locale')
113
- ->orderBy('t.name', 'ASC')
114
- ->setParameter('locale', 'en');
115
- },
116
111
));
117
112
118
113
group_by
You can’t perform that action at this time.
0 commit comments