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 :frowning:

Thanks
Manolo

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

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

https://www.dropbox.com/s/sj8j5xngocwat9b/Relationship.pdf?dl=0