Announcement

Collapse
No announcement yet.
X
  • Filter
  • Time
Clear All
new posts

    Displaying entries from 2 tables in a single ListGrid

    I want to combine data from 2 tables and display the resulting list in a single ListGrid. These 2 tables have some common columns and some columns specific to the each table. The data stored in these tables are defined by 2 JPA annotated entities.

    What would be the best way to display the combination of these two tables in a single ListGrid? I want to avoid creating a new table in the database.

    #2
    For simple cases, use dataSourceField.includeFrom.

    For more advanced cases, we generally recommend using SQLDataSource instead of JPA, because it makes this case easy (via SQL Templating). It can even make sense to use SQLDataSource alongside JPA as a means of providing more direct access to the DB when you need to do efficient joins and don't feel like writing reams of Java code.

    Ultimately, if for whatever reason you can't use SQLDataSource, you need to write a DMI that does direct access to JPA, then you can return data in any of the ways that DMI supports (see QuickStart guide).

    Comment

    Working...
    X