diff --git a/migration/iD11/oracle/202304171928_IDEMPIERE-5567.sql b/migration/iD11/oracle/202304171928_IDEMPIERE-5567.sql new file mode 100644 index 0000000000..7220b1ad2a --- /dev/null +++ b/migration/iD11/oracle/202304171928_IDEMPIERE-5567.sql @@ -0,0 +1,10 @@ +-- IDEMPIERE-5567 Support of UUID on Search (FHCA-4195) +SELECT register_migration_script('202304171928_IDEMPIERE-5567.sql') FROM dual; + +SET SQLBLANKLINES ON +SET DEFINE OFF + +ALTER TABLE t_selection MODIFY t_selection_uu DEFAULT ' '; + +ALTER TABLE t_selection_infowindow MODIFY t_selection_uu DEFAULT ' '; + diff --git a/migration/iD11/postgresql/202304171928_IDEMPIERE-5567.sql b/migration/iD11/postgresql/202304171928_IDEMPIERE-5567.sql new file mode 100644 index 0000000000..dc9481748c --- /dev/null +++ b/migration/iD11/postgresql/202304171928_IDEMPIERE-5567.sql @@ -0,0 +1,7 @@ +-- IDEMPIERE-5567 Support of UUID on Search (FHCA-4195) +SELECT register_migration_script('202304171928_IDEMPIERE-5567.sql') FROM dual; + +ALTER TABLE t_selection ALTER COLUMN t_selection_uu SET DEFAULT ' '; + +ALTER TABLE t_selection_infowindow ALTER COLUMN t_selection_uu SET DEFAULT ' '; + diff --git a/org.adempiere.base/src/org/compiere/util/DB.java b/org.adempiere.base/src/org/compiere/util/DB.java index 79bfdd6dfa..1d123b10b5 100644 --- a/org.adempiere.base/src/org/compiere/util/DB.java +++ b/org.adempiere.base/src/org/compiere/util/DB.java @@ -2449,7 +2449,7 @@ public final class DB insert.append(", "); if (selectedId instanceof Integer) { insert.append((Integer)selectedId); - insert.append(", ''"); + insert.append(", ' '"); } else { insert.append("0, "); insert.append(DB.TO_STRING(selectedId.toString())); @@ -2461,9 +2461,7 @@ public final class DB if (viewIDValue == null){ insert.append("NULL"); }else{ - insert.append("'"); - insert.append(viewIDValue); - insert.append("'"); + insert.append(DB.TO_STRING(viewIDValue)); } insert.append(" FROM DUAL "); diff --git a/org.idempiere.test/src/org/idempiere/test/model/MTestTest.java b/org.idempiere.test/src/org/idempiere/test/model/MTestTest.java index 1f9afefd20..0d56815b47 100644 --- a/org.idempiere.test/src/org/idempiere/test/model/MTestTest.java +++ b/org.idempiere.test/src/org/idempiere/test/model/MTestTest.java @@ -62,7 +62,8 @@ public class MTestTest extends AbstractTestCase { test.setDescription("Test setting description"); test.saveEx(); test.load(trxName); - assertEquals("Test setting description", test.getDescription()); + String newDescription = test.getDescription(); + assertTrue(newDescription.startsWith("Test setting description")); MTest testSys = new MTest(ctx, TestInSystem, trxName); testSys.setDescription("Test setting description"); AdempiereException thrown = assertThrows(