我有以下區域結構: -Grails的SQL轉換成Grails的條件查詢
class A{
B b
C c
String email
}
class B{}
class C {
D d
}
class D{}
下面是我的,我需要轉換成Grails的條件查詢的SQL查詢。
select * from A aa
inner join C ca on ca.c_id = aa.id and aa.email = 'source'
inner join D da on da.id = ca.d_id
inner join B ba on aa.b_id = ba.id
inner join A aa1 on b.id = aa1.b_id and aa1.email = 'response'
'在a.b_id = b.id'上的內連接B ba ... a'和'b'代表什麼? – injecteer
@injecteer對不起,它輸入錯誤。它是aa.b_id = ba.id –
這裏還有'aa1上b.id = aa1.b_id和aa1.email ='response''? – injecteer