Vaadin lets you build secure, UX-first PWAs entirely in Java.
Free ebook & tutorial.
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.
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
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
Have anybody an idea?
I find this one:
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.