diff --git a/dhis-2/dhis-services/dhis-service-core/src/main/java/org/hisp/dhis/datavalue/hibernate/HibernateDataValueStore.java b/dhis-2/dhis-services/dhis-service-core/src/main/java/org/hisp/dhis/datavalue/hibernate/HibernateDataValueStore.java index 6cad690d5453..b7eb7e0e8d46 100644 --- a/dhis-2/dhis-services/dhis-service-core/src/main/java/org/hisp/dhis/datavalue/hibernate/HibernateDataValueStore.java +++ b/dhis-2/dhis-services/dhis-service-core/src/main/java/org/hisp/dhis/datavalue/hibernate/HibernateDataValueStore.java @@ -186,13 +186,12 @@ public DataValue getSoftDeletedDataValue(DataValue dataValue) { dataValue.setPeriod(storedPeriod); String sql = - """ - select * from datavalue where dataelementid = :deid - and periodid = :periodid - and attributeoptioncomboid = :attributeOptionCombo - and categoryoptioncomboid = :categoryOptionCombo - and sourceid = :sourceid - and deleted is true"""; + "select * from datavalue where dataelementid = :deid\n" + + "and periodid = :periodid\n" + + "and attributeoptioncomboid = :attributeOptionCombo\n" + + "and categoryoptioncomboid = :categoryOptionCombo\n" + + "and sourceid = :sourceid\n" + + "and deleted is true"; return getSingleResult( getSession()