File tree 1 file changed +2
-7
lines changed
1 file changed +2
-7
lines changed Original file line number Diff line number Diff line change @@ -124,17 +124,12 @@ cast into a string and so must have a ``__toString()`` method.
124
124
can use anything supported by the
125
125
:doc: `PropertyAccessor component </components/property_access/introduction >`
126
126
127
- Usage sample::
127
+ For example, if the translations property is actually an associative array of
128
+ objects, each with a name property, then you could do this::
128
129
129
130
$builder->add('gender', 'entity', array(
130
131
'class' => 'MyBundle:Gender',
131
132
'property' => 'translations[en].name',
132
- 'query_builder' => function(EntityRepository $er) {
133
- return $er->createQueryBuilder('g')
134
- ->join('g.translations', 't', 'WITH', 't.locale = :locale')
135
- ->orderBy('t.name', 'ASC')
136
- ->setParameter('locale', 'en');
137
- },
138
133
));
139
134
140
135
group_by
You can’t perform that action at this time.
0 commit comments