Hello every one,
I have two JPA entity beans as follow.
class Offer {
int id;
String offerName;
List<Customer> customerList;
//Ommit getter setter
}
class Customer {
int id;
int customerName;
}
I want to show the offer table as follow.
offerid offername customerid
off1 offer one cust001
off1 offer one cust002
off2 offer two cust004
off3 offer three cust001
off3 offer three cust002
off3 offer three cust003
I try to do as follow.
BeanContainer<String, Offer> offBeanContainer = new BeanContainer<String, Offer>(Offer.class);
offersBC.addNestedContainerBean("
customerList
");
offersBC.setBeanIdProperty(“offerId”);
offerTable.setVisibleColumns(new Object {“offerId”, “offerName”, "
customerList.Customer.customerId
"});
And I got the following error.
Caused by: java.lang.IllegalArgumentException: Ids must exist in the Container or as a generated column, missing id: customerList.Customer.customerId
Any help is really appreciated.