Well, i have class named "Consultation" that have a list of "ItemBudget", and i have a class named "Budget" that have a list of "ItemOrcamento" too. The relation Consultation<-->ItemBudget is ManyToMany, and relation Budget<-->ItemBudget is OneToMany.
In JSF i do the following:
<p:dataTable rowKey="#{item.id}" var="item" value="#{consultationMB.consultation.budget.itensAsList}" selection="#{consultationMB.itemBudget}" >
I use method "getItensAsList" that return a ArrayList() instead of a HashSet() that primefaces dataTable tag can't read correctly
As you can see, my selection is "itemBudget", so in my ManagedBean called ConsultationMBImpl i try to execute the following:
if (!itemBudget.getSituation().getCode().equals("WAITING_CONCLUSION")){
//some code here
}
When i try make the code above all fields that have reference to another class like: Situation, Dentist and others have this: "Dentist_javassist_32", "Situation_javassist_49"... And all fields are null or zero.