JPAContainer display more joined database tables in Vaadin Table


could you give me some hint how to display more joined tables in one Vaadin Table using JPAContainer please? Or it is necessary to use SQL Container?

I tried to play with following statements, but it seems to me JPAContainer can work with entity class only:

jpaManager.createQuery("" +
    "SELECT p,, " +
    "FROM Project p " +
    "JOIN p.customer c ").getResultList();
jpaContainer = JPAContainerFactory.make(Project.class, jpaManager);        

Is it efficient to retrieve query result as a List<?> and import items to JPAContainer in a cycle?

Thank you

Do you have any ideas please?

All replies are welcome, even:

  • it is not possible
  • it is part of paid support
  • it requieres paid funcionality
  • etc…

I just need any direction.


Uaaa, I got it! :slight_smile:

Finally, it is easy. It is sufficient to call a getter of joined entity (table) column in class definition of main entity:

public class PurchaseInvoice {

@GeneratedValue(strategy = GenerationType.AUTO)
private long id;

private Company supplier;

private String supplierName;

public String getSupplierName() {
return supplier.getName();

Of course it doesn’t join the whole table but only selected columns. Anyway, I am quite happy about this solution :slight_smile: