JPAContainer and TreeTable

Hello,

I got two kind entity

  • Materials entity
  • Vehicle entity that is composed of one material (one material cas have many vehicle).

I got a JPAContainer of Vehicle and i try to put it in a TreeTable.

VehicleJPAContainer is defined like this:

JPAContainer<Vehicle> vehicleJPAContainer = JPAContainerFactory.makeReadOnly...
vehicleJPAContainer.addNestedProperty("material.name");
vehicleJPAContainer.setParentProperty("material.name");

I define my tree table like this:

TreeTable vehicleTreeTable = new TreeTable();
vehicleTreeTable.setContainerDataSource(vehicleJPAContainer);
vehicleTreeTable.setColumnReorderingAllowed(true);

But nothing is show in the table. I try with a normal table and every vehicle is displayed.
Can someone help me?

Thanks, Mathieu.