JPAContainer OneToMany and ManyToOne

I would access from two tables some attributes, one realitionship is a OneToMany and another is a ManyToOne

sucheStoffJPAContainer = JPAContainerFactory.make(Dokument.class, Schulung.PERSISTENCE_UNIT);


The ERM and the code of my entities are in the attachment.

22101.pdf (568 KB)

sucheStoffJPAContainer.addNestedContainerProperty(“stoffID.matnr”); will add a list of Matnr
One Stoff has many Matnr’s, but apparently you only want one ? which one ?
If you want to display the required Matnr in a grid column, you could use GeneratedPropertyContainer


When I add this:

I get the following error:

java.lang.IllegalArgumentException: Invalid property name
at com.vaadin.addon.jpacontainer.PropertyList.getNestedProperty(
at com.vaadin.addon.jpacontainer.PropertyList.addNestedProperty(

No I want to see every matnr, I have made a samll example see attachment

With SQL Container an FreeformQuery I got this result, but it is not lazy and i have not the option to filtering the vaadin FilterTable
22102.pdf (460 KB)

Have anybody an idea?

I find this one:!addon/jpa-criteria-lazy-container

But it doesn’t support vaadin 7

The solution is probably just do
stop using JPAContainer
. This kind of issues are just much simpler if you handle JPA stuff separately and just use entities and lists of entities in your Vaadin UI code. And much easier if you use Viritin components that consider java.util.List and basic java beans as first class citizen in components APIs.