Business Data Model - JPQL outer join


Hi, I have two Business Data Model:

Rilievo - nome type:String - controlli type:Controllo multiple (relationship: Aggregation)

Controllo - nome type:String - codice type:String

In Manage Business Data Model (Studio) I want to create a custom query where I load all Controllo not present in Rilievo. What is the query JPQL?

I tried this query: SELECT c FROM Rilievo r RIGHT JOIN r.controlli c ORDER BY r.persistenceId ASC but it loads all controllo :(

Thanks Manolo


Submitted by rodrigojcortes on Wed, 09/30/2015 - 23:07

how to make a relationship between two Business Data Model? Please help

1 answer


Hi Manolo,

in your query you may add "where r.controlli is null" in your query.

I share you a good reminder about sql joins, also valid with JPQL

SQL joins