Important Notice - Forums is archived
To simplify things and help our users to be more productive, we have archived the current forum and focus our efforts on helping developers on Stack Overflow. You can post new questions on Stack Overflow or join our Discord channel.

Vaadin lets you build secure, UX-first PWAs entirely in Java.
Free ebook & tutorial.
JPAContainer addNestedContainerProperty "Invalid property"
I have two entities and would show data from this in one table
In SQL I make this with the following SQL Statement:
Select werk.*, firma.* From werk Inner Join firma On werk.firmaID = firma.ID
public class TestJoinTables extends Window {
private JPAContainer<Werk> werkContainer;
public TestJoinTables() {
werkContainer = JPAContainerFactory.make(Werk.class, Schulung.PERSISTENCE_UNIT);
werkContainer.addNestedContainerProperty("firma.name");
Table filterTable = new Table();
// FilterTable filterTable = new FilterTable();
filterTable.setContainerDataSource(werkContainer);
...}
I think it should work with addNestedContainerProperty, but i get an error "Invalid property name"
How could I solve this problem? Should I use another Container?
In the attachment you could find my two entities, they have a @ManyToOne relation
I have a solution
class firma:
@OneToMany(mappedBy = "firmaID", targetEntity = Werk.class, cascade = CascadeType.ALL)
private Set<Werk> werks;
class werk:
@ManyToOne(targetEntity = Firma.class, cascade = CascadeType.ALL)
@JoinColumn(name="firmaID")
private Firma firmaID;
addNestedContainerProperty("firmaID.nameXYZ");