fixed oneOf case queryer issue with resolving the table alias
This commit is contained in:
@ -1320,7 +1320,7 @@
|
||||
" 'id', entity_11.id,",
|
||||
" 'is_primary', contact_9.is_primary,",
|
||||
" 'target', CASE",
|
||||
" WHEN entity_11.target_type = 'address' THEN",
|
||||
" WHEN relationship_10.target_type = 'address' THEN",
|
||||
" ((SELECT jsonb_build_object(",
|
||||
" 'archived', entity_13.archived,",
|
||||
" 'city', address_12.city,",
|
||||
@ -1333,7 +1333,7 @@
|
||||
" WHERE",
|
||||
" NOT entity_13.archived",
|
||||
" AND relationship_10.target_id = entity_13.id))",
|
||||
" WHEN entity_11.target_type = 'email_address' THEN",
|
||||
" WHEN relationship_10.target_type = 'email_address' THEN",
|
||||
" ((SELECT jsonb_build_object(",
|
||||
" 'address', email_address_14.address,",
|
||||
" 'archived', entity_15.archived,",
|
||||
@ -1346,7 +1346,7 @@
|
||||
" WHERE",
|
||||
" NOT entity_15.archived",
|
||||
" AND relationship_10.target_id = entity_15.id))",
|
||||
" WHEN entity_11.target_type = 'phone_number' THEN",
|
||||
" WHEN relationship_10.target_type = 'phone_number' THEN",
|
||||
" ((SELECT jsonb_build_object(",
|
||||
" 'archived', entity_17.archived,",
|
||||
" 'created_at', entity_17.created_at,",
|
||||
@ -1556,7 +1556,7 @@
|
||||
" 'id', entity_11.id,",
|
||||
" 'is_primary', contact_9.is_primary,",
|
||||
" 'target', CASE",
|
||||
" WHEN entity_11.target_type = 'address' THEN",
|
||||
" WHEN relationship_10.target_type = 'address' THEN",
|
||||
" ((SELECT jsonb_build_object(",
|
||||
" 'archived', entity_13.archived,",
|
||||
" 'city', address_12.city,",
|
||||
@ -1569,7 +1569,7 @@
|
||||
" WHERE",
|
||||
" NOT entity_13.archived",
|
||||
" AND relationship_10.target_id = entity_13.id))",
|
||||
" WHEN entity_11.target_type = 'email_address' THEN",
|
||||
" WHEN relationship_10.target_type = 'email_address' THEN",
|
||||
" ((SELECT jsonb_build_object(",
|
||||
" 'address', email_address_14.address,",
|
||||
" 'archived', entity_15.archived,",
|
||||
@ -1582,7 +1582,7 @@
|
||||
" WHERE",
|
||||
" NOT entity_15.archived",
|
||||
" AND relationship_10.target_id = entity_15.id))",
|
||||
" WHEN entity_11.target_type = 'phone_number' THEN",
|
||||
" WHEN relationship_10.target_type = 'phone_number' THEN",
|
||||
" ((SELECT jsonb_build_object(",
|
||||
" 'archived', entity_17.archived,",
|
||||
" 'created_at', entity_17.created_at,",
|
||||
@ -1989,7 +1989,7 @@
|
||||
" 'is_primary', contact_11.is_primary,",
|
||||
" 'target',",
|
||||
" CASE",
|
||||
" WHEN entity_13.target_type = 'address' THEN (",
|
||||
" WHEN relationship_12.target_type = 'address' THEN (",
|
||||
" (SELECT jsonb_build_object(",
|
||||
" 'archived', entity_15.archived,",
|
||||
" 'city', address_14.city,",
|
||||
@ -2003,7 +2003,7 @@
|
||||
" NOT entity_15.archived",
|
||||
" AND relationship_12.target_id = entity_15.id)",
|
||||
" )",
|
||||
" WHEN entity_13.target_type = 'email_address' THEN (",
|
||||
" WHEN relationship_12.target_type = 'email_address' THEN (",
|
||||
" (SELECT jsonb_build_object(",
|
||||
" 'address', email_address_16.address,",
|
||||
" 'archived', entity_17.archived,",
|
||||
@ -2017,7 +2017,7 @@
|
||||
" NOT entity_17.archived",
|
||||
" AND relationship_12.target_id = entity_17.id)",
|
||||
" )",
|
||||
" WHEN entity_13.target_type = 'phone_number' THEN (",
|
||||
" WHEN relationship_12.target_type = 'phone_number' THEN (",
|
||||
" (SELECT jsonb_build_object(",
|
||||
" 'archived', entity_19.archived,",
|
||||
" 'created_at', entity_19.created_at,",
|
||||
|
||||
Reference in New Issue
Block a user