javax.el.PropertyNotFoundException: Property not found on type org.hibernate.collection.internal.PersistentSet

前端 未结 1 739
滥情空心
滥情空心 2020-12-19 13:25

I try to recuperate data from association ManyToMany but i can\'t, this is my code.

Entity Produit :

@Entity
public class Produit implements Serializ         


        
相关标签:
1条回答
  • 2020-12-19 14:11
    <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">
    
    0 讨论(0)
提交回复
热议问题