I try to recuperate data from association ManyToMany but i can\'t, this is my code.
Entity Produit :
@Entity
public class Produit implements Serializ
<h:dataTable value="#{car.terminals}" var="der"> <p:column> <h:outputText value="#{der.geometrie}" />
javax.el.PropertyNotFoundException: Property 'geometrie' not found on type org.hibernate.collection.internal.PersistentSet
Thus, the #{car.terminals}
is a Set<E>
. The <h:dataTable>
, <p:dataTable>
and <ui:repeat>
components doesn't support iterating over a Set<E>
. The #{der}
will then basically represent the Set<E>
itself. The builtin support for iterating over Set<E>
will come in future JSF 2.3 version.
If it's not an option to replace Set<E>
by a List<E>
, then just get an array out of it as below:
<h:dataTable value="#{car.terminals.toArray()}" var="terminal">