Skip to content

Commit

Permalink
Closes #2659 Fix SQL in Mappers
Browse files Browse the repository at this point in the history
  • Loading branch information
Jörg Heffner committed Aug 12, 2024
1 parent 306a407 commit eb2fb14
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 8 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,8 @@ public interface ClassificationMapper {
"<script> SELECT ID, KEY, PARENT_ID, PARENT_KEY, CATEGORY, TYPE, DOMAIN, VALID_IN_DOMAIN, CREATED, MODIFIED, NAME, DESCRIPTION, PRIORITY, SERVICE_LEVEL, APPLICATION_ENTRY_POINT, CUSTOM_1, CUSTOM_2, CUSTOM_3, CUSTOM_4, CUSTOM_5, CUSTOM_6, CUSTOM_7, CUSTOM_8 "
+ "FROM CLASSIFICATION "
+ "WHERE KEY = #{key}"
+ "AND DOMAIN = #{domain}"
+ "<if test=\"_databaseId == 'db2'\">with UR </if> "
+ " AND DOMAIN = #{domain}"
+ "<if test=\"_databaseId == 'db2'\"> with UR </if> "
+ "</script>")
@Result(property = "id", column = "ID")
@Result(property = "key", column = "KEY")
Expand Down Expand Up @@ -48,7 +48,7 @@ public interface ClassificationMapper {
"<script>SELECT ID, KEY, PARENT_ID, PARENT_KEY, CATEGORY, TYPE, DOMAIN, VALID_IN_DOMAIN, CREATED, MODIFIED, NAME, DESCRIPTION, PRIORITY, SERVICE_LEVEL, APPLICATION_ENTRY_POINT, CUSTOM_1, CUSTOM_2, CUSTOM_3, CUSTOM_4, CUSTOM_5, CUSTOM_6, CUSTOM_7, CUSTOM_8 "
+ "FROM CLASSIFICATION "
+ "WHERE ID = #{id}"
+ "<if test=\"_databaseId == 'db2'\">with UR </if> "
+ "<if test=\"_databaseId == 'db2'\"> with UR </if> "
+ "</script>")
@Result(property = "id", column = "ID")
@Result(property = "key", column = "KEY")
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ public interface ObjectReferenceMapper {
+ "FROM OBJECT_REFERENCE "
+ "WHERE ID = #{id}"
+ "ORDER BY VALUE ASC, TYPE ASC, SYSTEM_INSTANCE ASC, SYSTEM ASC, COMPANY ASC"
+ "<if test=\"_databaseId == 'db2'\">with UR </if> "
+ "<if test=\"_databaseId == 'db2'\"> with UR </if> "
+ "</script>")
@Result(property = "id", column = "ID")
@Result(property = "company", column = "COMPANY")
Expand All @@ -34,8 +34,8 @@ public interface ObjectReferenceMapper {
"<script>SELECT ID, TASK_ID, COMPANY, SYSTEM, SYSTEM_INSTANCE, TYPE, VALUE "
+ "FROM OBJECT_REFERENCE "
+ "WHERE TASK_ID = #{taskId}"
+ "ORDER BY VALUE ASC, TYPE ASC, SYSTEM_INSTANCE ASC, SYSTEM ASC, COMPANY ASC"
+ "<if test=\"_databaseId == 'db2'\">with UR </if> "
+ " ORDER BY VALUE ASC, TYPE ASC, SYSTEM_INSTANCE ASC, SYSTEM ASC, COMPANY ASC"
+ "<if test=\"_databaseId == 'db2'\"> with UR </if> "
+ "</script>")
@Result(property = "id", column = "ID")
@Result(property = "taskId", column = "TASK_ID")
Expand All @@ -60,7 +60,7 @@ public interface ObjectReferenceMapper {
+ "</choose>"
+ "</where>"
+ "ORDER BY VALUE ASC, TYPE ASC, SYSTEM_INSTANCE ASC, SYSTEM ASC, COMPANY ASC"
+ "<if test=\"_databaseId == 'db2'\">with UR </if> "
+ "<if test=\"_databaseId == 'db2'\"> with UR </if> "
+ "</script>")
@Result(property = "id", column = "ID")
@Result(property = "taskId", column = "TASK_ID")
Expand All @@ -81,7 +81,7 @@ List<ObjectReferenceImpl> findObjectReferencesByTaskIds(
+ "AND TYPE = #{objectReference.type} "
+ "AND VALUE = #{objectReference.value} "
+ "ORDER BY VALUE ASC, TYPE ASC, SYSTEM_INSTANCE ASC, SYSTEM ASC, COMPANY ASC"
+ "<if test=\"_databaseId == 'db2'\">with UR </if> "
+ "<if test=\"_databaseId == 'db2'\"> with UR </if> "
+ "</script>")
@Result(property = "id", column = "ID")
@Result(property = "company", column = "COMPANY")
Expand Down

0 comments on commit eb2fb14

Please sign in to comment.