From 04ce7e90b6edce573e63c02de563456cc33f99ff Mon Sep 17 00:00:00 2001 From: Lalithkumarponnambalam Date: Thu, 21 Mar 2024 15:05:27 +0530 Subject: [PATCH] Update relationships.md --- pages/jdl/relationships.md | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/pages/jdl/relationships.md b/pages/jdl/relationships.md index 61c4a1e83..e98298106 100644 --- a/pages/jdl/relationships.md +++ b/pages/jdl/relationships.md @@ -157,6 +157,22 @@ entity. --- +#### With joint fields + +Used to specify which column in the entities are used for the join (default to id) + +```jdl +relationship OneToOne { + A{b(name)} to B{a(name)} +} +``` + +It roughly translates to `SQL: JOIN B b with a.name = b.name` + +--- + +--- + #### With methods ```jdl