diff --git a/view/jpa/src/test/kotlin/io/holunda/polyflow/view/jpa/JpaPolyflowViewServiceTaskITest.kt b/view/jpa/src/test/kotlin/io/holunda/polyflow/view/jpa/JpaPolyflowViewServiceTaskITest.kt index 3d38b27c2..c08450421 100644 --- a/view/jpa/src/test/kotlin/io/holunda/polyflow/view/jpa/JpaPolyflowViewServiceTaskITest.kt +++ b/view/jpa/src/test/kotlin/io/holunda/polyflow/view/jpa/JpaPolyflowViewServiceTaskITest.kt @@ -466,10 +466,10 @@ internal class JpaPolyflowViewServiceTaskITest { val assigned = jpaPolyflowViewService.query(TasksForCandidateUserAndGroupQuery(user = User("zoro", setOf("muppets")), includeAssigned = true)) assertThat(assigned.elements).hasSize(2) - assertThat(assigned.elements[0].name).isEqualTo("task name 1") - assertThat(assigned.elements[0].id).isEqualTo(id) - assertThat(assigned.elements[1].name).isEqualTo("task name 4") - assertThat(assigned.elements[1].id).isEqualTo(id4) + assertThat(assigned.elements[0].id).isEqualTo(id4) + assertThat(assigned.elements[0].name).isEqualTo("task name 4") + assertThat(assigned.elements[1].id).isEqualTo(id) + assertThat(assigned.elements[1].name).isEqualTo("task name 1") val assignedToZoro = jpaPolyflowViewService.query(TasksForCandidateUserAndGroupQuery(user = User("zoro", setOf("muppets")), includeAssigned = true, filters = listOf("task.assignee=zoro"))) assertThat(assignedToZoro.elements).hasSize(1) diff --git a/view/jpa/src/test/kotlin/io/holunda/polyflow/view/jpa/itest/NoToastMariaDbSQLDialect.kt b/view/jpa/src/test/kotlin/io/holunda/polyflow/view/jpa/itest/NoToastMariaDbSQLDialect.kt deleted file mode 100644 index 06e38ddb3..000000000 --- a/view/jpa/src/test/kotlin/io/holunda/polyflow/view/jpa/itest/NoToastMariaDbSQLDialect.kt +++ /dev/null @@ -1,44 +0,0 @@ -package io.holunda.polyflow.view.jpa.itest - -import org.hibernate.boot.model.TypeContributions -import org.hibernate.dialect.MariaDBDialect -import org.hibernate.dialect.PostgreSQLDialect -import org.hibernate.engine.jdbc.dialect.spi.DialectResolutionInfo -import org.hibernate.service.ServiceRegistry -import org.hibernate.type.SqlTypes -import org.hibernate.type.descriptor.jdbc.BinaryJdbcType -import org.hibernate.type.descriptor.sql.internal.DdlTypeImpl -import java.sql.Types - -@Suppress("unused") // used in application.yaml -class NoToastMariaDbSQLDialect(info: DialectResolutionInfo) : MariaDBDialect(info) { - - override fun registerColumnTypes(typeContributions: TypeContributions, serviceRegistry: ServiceRegistry) { - super.registerColumnTypes(typeContributions, serviceRegistry) - val ddlTypeRegistry = typeContributions.typeConfiguration.ddlTypeRegistry - ddlTypeRegistry.addDescriptor(DdlTypeImpl(Types.BLOB, "bytea", this)) - ddlTypeRegistry.addDescriptor(DdlTypeImpl(Types.CLOB, "bytea", this)) - ddlTypeRegistry.addDescriptor(DdlTypeImpl(Types.NCLOB, "bytea", this)) - } - - override fun columnType(sqlTypeCode: Int): String { - return when (sqlTypeCode) { - SqlTypes.BLOB -> "bytea" - else -> super.columnType(sqlTypeCode) - } - } - - override fun castType(sqlTypeCode: Int): String { - return when (sqlTypeCode) { - SqlTypes.BLOB -> "bytea" - else -> super.castType(sqlTypeCode) - } - } - - override fun contributeTypes(typeContributions: TypeContributions, serviceRegistry: ServiceRegistry) { - super.contributeTypes(typeContributions, serviceRegistry) - val jdbcTypeRegistry = typeContributions.typeConfiguration - .jdbcTypeRegistry - jdbcTypeRegistry.addDescriptor(Types.BLOB, BinaryJdbcType.INSTANCE) - } -}