Multiple <count-property></count-property> in list #7312
Answered
by
alexander-schranz
GandonNicolas
asked this question in
Q&A
-
Beta Was this translation helpful? Give feedback.
Answered by
alexander-schranz
Jun 4, 2024
Replies: 1 comment 1 reply
-
The <count-property name="nombre_inscription" visibility="yes" translation="Inscrits">
<field-name>id</field-name>
+ <entity-name>Inscription_1</entity-name>
<joins>
<join>
+ <entity-name>Inscription_1</entity-name>
<field-name>App\Entity\Atelier.inscriptions</field-name>
+ <condition>Inscription_1.etat = 1</condition>
</join>
</joins>
</count-property>
<count-property name="nombre_liste_attente" visibility="yes" translation="Liste d'attente">
<field-name>id</field-name>
+ <entity-name>Inscription_2</entity-name>
<joins>
<join>
+ <entity-name>Inscription_2</entity-name>
<field-name>App\Entity\Atelier.inscriptions</field-name>
+ <condition>Inscription.etat = 2</condition>
</join>
</joins>
</count-property> Entity-name is here sadly a little missleading. |
Beta Was this translation helpful? Give feedback.
1 reply
Answer selected by
alexander-schranz
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
The
entityName
is mapped in the queryBuilder to thejoin
alias of doctrine so you need change the query builder to have a unique name per join.