MINOR: Fix delete lineage in case of override lineage enabled (#17625)

This commit is contained in:
Mayur Singal 2024-08-29 15:46:58 +05:30 committed by ulixius9
parent c23fdc88b4
commit d8ec47e787

View File

@ -1020,13 +1020,13 @@ public interface CollectionDAO {
value =
"DELETE FROM entity_relationship "
+ "WHERE JSON_UNQUOTE(JSON_EXTRACT(json, '$.source')) = :source AND toId = :toId AND toEntity = :toEntity "
+ "AND relation = :relation ORDER BY fromId",
+ "AND relation = :relation",
connectionType = MYSQL)
@ConnectionAwareSqlUpdate(
value =
"DELETE FROM entity_relationship "
+ "WHERE json->>'source' = :source AND (toId = :toId AND toEntity = :toEntity) "
+ "AND relation = :relation ORDER BY fromId",
+ "AND relation = :relation",
connectionType = POSTGRES)
void deleteLineageBySource(
@BindUUID("toId") UUID toId,