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 = value =
"DELETE FROM entity_relationship " "DELETE FROM entity_relationship "
+ "WHERE JSON_UNQUOTE(JSON_EXTRACT(json, '$.source')) = :source AND toId = :toId AND toEntity = :toEntity " + "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) connectionType = MYSQL)
@ConnectionAwareSqlUpdate( @ConnectionAwareSqlUpdate(
value = value =
"DELETE FROM entity_relationship " "DELETE FROM entity_relationship "
+ "WHERE json->>'source' = :source AND (toId = :toId AND toEntity = :toEntity) " + "WHERE json->>'source' = :source AND (toId = :toId AND toEntity = :toEntity) "
+ "AND relation = :relation ORDER BY fromId", + "AND relation = :relation",
connectionType = POSTGRES) connectionType = POSTGRES)
void deleteLineageBySource( void deleteLineageBySource(
@BindUUID("toId") UUID toId, @BindUUID("toId") UUID toId,