use _rv in sub-query for partner in DebitorEntity
This commit is contained in:
parent
acd1bd9e51
commit
36d96b543a
@ -55,14 +55,13 @@ public class HsOfficeDebitorEntity implements HasUuid, Stringifyable {
|
|||||||
@ManyToOne
|
@ManyToOne
|
||||||
@JoinFormula(
|
@JoinFormula(
|
||||||
referencedColumnName = "uuid",
|
referencedColumnName = "uuid",
|
||||||
// FIXME: use _rv in sub-query
|
|
||||||
value = """
|
value = """
|
||||||
(
|
(
|
||||||
SELECT DISTINCT partner.uuid
|
SELECT DISTINCT partner.uuid
|
||||||
FROM hs_office_partner partner
|
FROM hs_office_partner_rv partner
|
||||||
JOIN hs_office_relation dRel
|
JOIN hs_office_relation_rv dRel
|
||||||
ON dRel.uuid = debitorreluuid AND dRel.type = 'DEBITOR'
|
ON dRel.uuid = debitorreluuid AND dRel.type = 'DEBITOR'
|
||||||
JOIN hs_office_relation pRel
|
JOIN hs_office_relation_rv pRel
|
||||||
ON pRel.uuid = partner.partnerRelUuid AND pRel.type = 'PARTNER'
|
ON pRel.uuid = partner.partnerRelUuid AND pRel.type = 'PARTNER'
|
||||||
WHERE pRel.holderUuid = dRel.anchorUuid
|
WHERE pRel.holderUuid = dRel.anchorUuid
|
||||||
)
|
)
|
||||||
|
Loading…
Reference in New Issue
Block a user