From 65e924feaa7f1948217face21267d434476e12ad Mon Sep 17 00:00:00 2001 From: Roland Praml Date: Fri, 17 Dec 2021 09:15:42 +0100 Subject: [PATCH 01/17] Deleted obsolete LoadErrorHandler --- .../java/io/ebean/plugin/LoadErrorHandler.java | 14 -------------- 1 file changed, 14 deletions(-) delete mode 100644 ebean-api/src/main/java/io/ebean/plugin/LoadErrorHandler.java diff --git a/ebean-api/src/main/java/io/ebean/plugin/LoadErrorHandler.java b/ebean-api/src/main/java/io/ebean/plugin/LoadErrorHandler.java deleted file mode 100644 index 278a70f96..000000000 --- a/ebean-api/src/main/java/io/ebean/plugin/LoadErrorHandler.java +++ /dev/null @@ -1,14 +0,0 @@ -package io.ebean.plugin; - -import io.ebean.bean.EntityBean; - -/** - * Errorhandler to handle load errors and may be recover correct value. - * - * @author Roland Praml, FOCONIS AG - * - */ -@FunctionalInterface -public interface LoadErrorHandler { - void handleLoadError(EntityBean bean, Property prop, String fullName, Exception e); -} From f4d270e8b52d875f19400e9d48ab10f3897a0571 Mon Sep 17 00:00:00 2001 From: Roland Praml Date: Fri, 17 Dec 2021 09:13:11 +0100 Subject: [PATCH 02/17] FIX: JDBC URL for SqlServer (similar to testconfig-files) --- .../main/java/io/ebean/test/config/platform/SqlServerSetup.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ebean-test/src/main/java/io/ebean/test/config/platform/SqlServerSetup.java b/ebean-test/src/main/java/io/ebean/test/config/platform/SqlServerSetup.java index 2dc68b5d7..09b76323e 100644 --- a/ebean-test/src/main/java/io/ebean/test/config/platform/SqlServerSetup.java +++ b/ebean-test/src/main/java/io/ebean/test/config/platform/SqlServerSetup.java @@ -13,7 +13,7 @@ class SqlServerSetup implements PlatformSetup { config.setDefaultPort(1433); config.setUsernameDefault(); config.setPassword("SqlS3rv#r"); - config.setUrl("jdbc:sqlserver://localhost:${port};databaseName=${databaseName}"); + config.setUrl("jdbc:sqlserver://localhost:${port};databaseName=${databaseName};sendTimeAsDateTime=false"); config.setDriver("com.microsoft.sqlserver.jdbc.SQLServerDriver"); config.datasourceDefaults(); From 058021f8d039ac520aae6096786390a271e7ddac Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jonas=20P=C3=B6hler?= Date: Fri, 12 Nov 2021 15:56:07 +0100 Subject: [PATCH 03/17] ADD: metaHas and metaFindAll as functional sugar --- ebean-api/src/main/java/io/ebean/util/AnnotationUtil.java | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/ebean-api/src/main/java/io/ebean/util/AnnotationUtil.java b/ebean-api/src/main/java/io/ebean/util/AnnotationUtil.java index 583c99009..69127a316 100644 --- a/ebean-api/src/main/java/io/ebean/util/AnnotationUtil.java +++ b/ebean-api/src/main/java/io/ebean/util/AnnotationUtil.java @@ -71,6 +71,14 @@ public class AnnotationUtil { return typeGet(clazz, annotation) != null; } + public static boolean metaHas(AnnotatedElement element, Class annotationType) { + return !metaFindAll(element, annotationType).isEmpty(); + } + + public static Set metaFindAll(AnnotatedElement element, Class annotationType) { + return metaFindAllFor(element, Collections.singleton(annotationType)); + } + /** * Find all the annotations for the filter searching meta-annotations. */ From 91d1fb8cea8a560c21d1fa90474f89a1d8f3932b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jonas=20P=C3=B6hler?= Date: Fri, 17 Dec 2021 15:10:30 +0100 Subject: [PATCH 04/17] ADD: javadoc --- ebean-api/src/main/java/io/ebean/util/AnnotationUtil.java | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/ebean-api/src/main/java/io/ebean/util/AnnotationUtil.java b/ebean-api/src/main/java/io/ebean/util/AnnotationUtil.java index 69127a316..709019158 100644 --- a/ebean-api/src/main/java/io/ebean/util/AnnotationUtil.java +++ b/ebean-api/src/main/java/io/ebean/util/AnnotationUtil.java @@ -71,10 +71,16 @@ public class AnnotationUtil { return typeGet(clazz, annotation) != null; } + /** + * Check if an element is annotated with an annotation of given type searching meta-annotations. + */ public static boolean metaHas(AnnotatedElement element, Class annotationType) { return !metaFindAll(element, annotationType).isEmpty(); } + /** + * Find all the annotations of a given type searching meta-annotations. + */ public static Set metaFindAll(AnnotatedElement element, Class annotationType) { return metaFindAllFor(element, Collections.singleton(annotationType)); } From c0f4451d20146f887ed7aa61210817e244b228d4 Mon Sep 17 00:00:00 2001 From: Rob Bygrave Date: Mon, 20 Dec 2021 10:47:26 +1300 Subject: [PATCH 05/17] Fix pom versions in test only modules after release --- ebean-kotlin/pom.xml | 6 +++--- tests/test-java16/pom.xml | 6 +++--- tests/test-kotlin/pom.xml | 4 ++-- 3 files changed, 8 insertions(+), 8 deletions(-) diff --git a/ebean-kotlin/pom.xml b/ebean-kotlin/pom.xml index 22fafea6c..7f1b375de 100644 --- a/ebean-kotlin/pom.xml +++ b/ebean-kotlin/pom.xml @@ -5,7 +5,7 @@ ebean-parent io.ebean - 12.13.2-SNAPSHOT + 12.13.3-SNAPSHOT 4.0.0 @@ -29,7 +29,7 @@ io.ebean ebean-core - 12.13.2-SNAPSHOT + 12.13.3-SNAPSHOT provided @@ -51,7 +51,7 @@ io.ebean ebean-test - 12.13.2-SNAPSHOT + 12.13.3-SNAPSHOT test diff --git a/tests/test-java16/pom.xml b/tests/test-java16/pom.xml index 0f4927da5..c57560c1f 100644 --- a/tests/test-java16/pom.xml +++ b/tests/test-java16/pom.xml @@ -20,7 +20,7 @@ io.ebean ebean - 12.13.2-SNAPSHOT + 12.13.3-SNAPSHOT @@ -32,7 +32,7 @@ io.ebean ebean-test - 12.13.2-SNAPSHOT + 12.13.3-SNAPSHOT test @@ -58,7 +58,7 @@ io.ebean querybean-generator - 12.13.2-SNAPSHOT + 12.13.3-SNAPSHOT diff --git a/tests/test-kotlin/pom.xml b/tests/test-kotlin/pom.xml index 3ab10cdf5..39edcf47b 100644 --- a/tests/test-kotlin/pom.xml +++ b/tests/test-kotlin/pom.xml @@ -36,14 +36,14 @@ io.ebean ebean-test - 12.13.2-SNAPSHOT + 12.13.3-SNAPSHOT test io.ebean ebean-core - 12.13.2-SNAPSHOT + 12.13.3-SNAPSHOT test From 254b0df16ba7390c786719d085ac6f5d2e18d714 Mon Sep 17 00:00:00 2001 From: Rob Bygrave Date: Mon, 20 Dec 2021 12:40:41 +1300 Subject: [PATCH 06/17] #2470 - Bump jedis to version 3.8.0 (from 3.6.3) --- ebean-redis/pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ebean-redis/pom.xml b/ebean-redis/pom.xml index dca810bd2..1e4aa1189 100644 --- a/ebean-redis/pom.xml +++ b/ebean-redis/pom.xml @@ -16,7 +16,7 @@ redis.clients jedis - 3.6.3 + 3.8.0 From 8ea2c31076e7be69cbf94cdd75615deff17b4d96 Mon Sep 17 00:00:00 2001 From: Rob Bygrave Date: Mon, 20 Dec 2021 12:45:30 +1300 Subject: [PATCH 07/17] #2471 - Bump avaje-config to 1.7 (from 1.5) with removed jndi lookup for DataSource --- ebean-api/pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ebean-api/pom.xml b/ebean-api/pom.xml index a27749023..08cbb1e1a 100644 --- a/ebean-api/pom.xml +++ b/ebean-api/pom.xml @@ -27,7 +27,7 @@ io.avaje avaje-config - 1.5 + 1.7 @@ -26,7 +26,7 @@ io.ebean ebean-core - 12.13.3-SNAPSHOT + 12.14.0-SNAPSHOT provided diff --git a/ebean-bom/pom.xml b/ebean-bom/pom.xml index de70b12e4..55df93398 100644 --- a/ebean-bom/pom.xml +++ b/ebean-bom/pom.xml @@ -4,7 +4,7 @@ ebean-parent io.ebean - 12.13.3-SNAPSHOT + 12.14.0-SNAPSHOT ebean bom @@ -71,88 +71,88 @@ io.ebean ebean - 12.13.3-SNAPSHOT + 12.14.0-SNAPSHOT io.ebean ebean-api - 12.13.3-SNAPSHOT + 12.14.0-SNAPSHOT io.ebean ebean-core - 12.13.3-SNAPSHOT + 12.14.0-SNAPSHOT io.ebean ebean-core-type - 12.13.3-SNAPSHOT + 12.14.0-SNAPSHOT io.ebean ebean-ddl-generator - 12.13.3-SNAPSHOT + 12.14.0-SNAPSHOT io.ebean ebean-externalmapping-api - 12.13.3-SNAPSHOT + 12.14.0-SNAPSHOT io.ebean ebean-externalmapping-xml - 12.13.3-SNAPSHOT + 12.14.0-SNAPSHOT io.ebean ebean-autotune - 12.13.3-SNAPSHOT + 12.14.0-SNAPSHOT io.ebean ebean-querybean - 12.13.3-SNAPSHOT + 12.14.0-SNAPSHOT io.ebean querybean-generator - 12.13.3-SNAPSHOT + 12.14.0-SNAPSHOT provided io.ebean kotlin-querybean-generator - 12.13.3-SNAPSHOT + 12.14.0-SNAPSHOT provided io.ebean ebean-test - 12.13.3-SNAPSHOT + 12.14.0-SNAPSHOT test io.ebean ebean-postgis - 12.13.3-SNAPSHOT + 12.14.0-SNAPSHOT io.ebean ebean-redis - 12.13.3-SNAPSHOT + 12.14.0-SNAPSHOT diff --git a/ebean-core-type/pom.xml b/ebean-core-type/pom.xml index 0e4062b6f..969353969 100644 --- a/ebean-core-type/pom.xml +++ b/ebean-core-type/pom.xml @@ -4,7 +4,7 @@ ebean-parent io.ebean - 12.13.3-SNAPSHOT + 12.14.0-SNAPSHOT ebean-core-type @@ -16,7 +16,7 @@ io.ebean ebean-api - 12.13.3-SNAPSHOT + 12.14.0-SNAPSHOT diff --git a/ebean-core/pom.xml b/ebean-core/pom.xml index 08752f040..99591b3bc 100644 --- a/ebean-core/pom.xml +++ b/ebean-core/pom.xml @@ -3,7 +3,7 @@ ebean-parent io.ebean - 12.13.3-SNAPSHOT + 12.14.0-SNAPSHOT ebean-core @@ -41,19 +41,19 @@ io.ebean ebean-api - 12.13.3-SNAPSHOT + 12.14.0-SNAPSHOT io.ebean ebean-core-type - 12.13.3-SNAPSHOT + 12.14.0-SNAPSHOT io.ebean ebean-externalmapping-api - 12.13.3-SNAPSHOT + 12.14.0-SNAPSHOT diff --git a/ebean-ddl-generator/pom.xml b/ebean-ddl-generator/pom.xml index 4a189ed69..ca5834e2c 100644 --- a/ebean-ddl-generator/pom.xml +++ b/ebean-ddl-generator/pom.xml @@ -4,7 +4,7 @@ ebean-parent io.ebean - 12.13.3-SNAPSHOT + 12.14.0-SNAPSHOT ebean ddl generation @@ -28,14 +28,14 @@ io.ebean ebean-core-type - 12.13.3-SNAPSHOT + 12.14.0-SNAPSHOT provided io.ebean ebean-core - 12.13.3-SNAPSHOT + 12.14.0-SNAPSHOT provided diff --git a/ebean-externalmapping-api/pom.xml b/ebean-externalmapping-api/pom.xml index 0566534a9..df664cb16 100644 --- a/ebean-externalmapping-api/pom.xml +++ b/ebean-externalmapping-api/pom.xml @@ -4,7 +4,7 @@ ebean-parent io.ebean - 12.13.3-SNAPSHOT + 12.14.0-SNAPSHOT ebean external mapping api diff --git a/ebean-externalmapping-xml/pom.xml b/ebean-externalmapping-xml/pom.xml index 5a651b9dc..adc50c0a5 100644 --- a/ebean-externalmapping-xml/pom.xml +++ b/ebean-externalmapping-xml/pom.xml @@ -4,7 +4,7 @@ ebean-parent io.ebean - 12.13.3-SNAPSHOT + 12.14.0-SNAPSHOT @@ -33,7 +33,7 @@ io.ebean ebean-externalmapping-api - 12.13.3-SNAPSHOT + 12.14.0-SNAPSHOT @@ -59,14 +59,14 @@ io.ebean ebean-core - 12.13.3-SNAPSHOT + 12.14.0-SNAPSHOT test io.ebean ebean-ddl-generator - 12.13.3-SNAPSHOT + 12.14.0-SNAPSHOT test diff --git a/ebean-kotlin/pom.xml b/ebean-kotlin/pom.xml index 7f1b375de..c5c473f23 100644 --- a/ebean-kotlin/pom.xml +++ b/ebean-kotlin/pom.xml @@ -5,7 +5,7 @@ ebean-parent io.ebean - 12.13.3-SNAPSHOT + 12.14.0-SNAPSHOT 4.0.0 @@ -29,7 +29,7 @@ io.ebean ebean-core - 12.13.3-SNAPSHOT + 12.14.0-SNAPSHOT provided @@ -51,7 +51,7 @@ io.ebean ebean-test - 12.13.3-SNAPSHOT + 12.14.0-SNAPSHOT test diff --git a/ebean-postgis/pom.xml b/ebean-postgis/pom.xml index 0862a5696..ed40a6aac 100644 --- a/ebean-postgis/pom.xml +++ b/ebean-postgis/pom.xml @@ -4,7 +4,7 @@ ebean-parent io.ebean - 12.13.3-SNAPSHOT + 12.14.0-SNAPSHOT ebean postgis @@ -23,7 +23,7 @@ io.ebean ebean-core - 12.13.3-SNAPSHOT + 12.14.0-SNAPSHOT provided @@ -74,7 +74,7 @@ io.ebean ebean-test - 12.13.3-SNAPSHOT + 12.14.0-SNAPSHOT test diff --git a/ebean-querybean/pom.xml b/ebean-querybean/pom.xml index a6e2507d7..a083f762b 100644 --- a/ebean-querybean/pom.xml +++ b/ebean-querybean/pom.xml @@ -4,7 +4,7 @@ ebean-parent io.ebean - 12.13.3-SNAPSHOT + 12.14.0-SNAPSHOT ebean querybean @@ -17,7 +17,7 @@ io.ebean ebean-core - 12.13.3-SNAPSHOT + 12.14.0-SNAPSHOT provided @@ -56,21 +56,21 @@ io.ebean ebean-ddl-generator - 12.13.3-SNAPSHOT + 12.14.0-SNAPSHOT test io.ebean querybean-generator - 12.13.3-SNAPSHOT + 12.14.0-SNAPSHOT test io.ebean ebean-test - 12.13.3-SNAPSHOT + 12.14.0-SNAPSHOT test diff --git a/ebean-redis/pom.xml b/ebean-redis/pom.xml index 1e4aa1189..56bb8bcdb 100644 --- a/ebean-redis/pom.xml +++ b/ebean-redis/pom.xml @@ -4,7 +4,7 @@ ebean-parent io.ebean - 12.13.3-SNAPSHOT + 12.14.0-SNAPSHOT ebean-redis @@ -22,35 +22,35 @@ io.ebean ebean-api - 12.13.3-SNAPSHOT + 12.14.0-SNAPSHOT provided io.ebean ebean-core - 12.13.3-SNAPSHOT + 12.14.0-SNAPSHOT provided io.ebean ebean-querybean - 12.13.3-SNAPSHOT + 12.14.0-SNAPSHOT test io.ebean querybean-generator - 12.13.3-SNAPSHOT + 12.14.0-SNAPSHOT test io.ebean ebean-test - 12.13.3-SNAPSHOT + 12.14.0-SNAPSHOT test diff --git a/ebean-test/pom.xml b/ebean-test/pom.xml index 98d355e3d..849d741f3 100644 --- a/ebean-test/pom.xml +++ b/ebean-test/pom.xml @@ -4,7 +4,7 @@ ebean-parent io.ebean - 12.13.3-SNAPSHOT + 12.14.0-SNAPSHOT ebean test @@ -29,14 +29,14 @@ io.ebean ebean-core - 12.13.3-SNAPSHOT + 12.14.0-SNAPSHOT provided io.ebean ebean-ddl-generator - 12.13.3-SNAPSHOT + 12.14.0-SNAPSHOT diff --git a/ebean/pom.xml b/ebean/pom.xml index 2c3dacdf5..cf41c4d90 100644 --- a/ebean/pom.xml +++ b/ebean/pom.xml @@ -4,7 +4,7 @@ ebean-parent io.ebean - 12.13.3-SNAPSHOT + 12.14.0-SNAPSHOT ebean composite @@ -22,20 +22,20 @@ io.ebean ebean-api - 12.13.3-SNAPSHOT + 12.14.0-SNAPSHOT io.ebean ebean-core - 12.13.3-SNAPSHOT + 12.14.0-SNAPSHOT io.ebean ebean-querybean - 12.13.3-SNAPSHOT + 12.14.0-SNAPSHOT diff --git a/pom.xml b/pom.xml index 1b48a5474..5daf59b3a 100644 --- a/pom.xml +++ b/pom.xml @@ -9,7 +9,7 @@ io.ebean ebean-parent - 12.13.3-SNAPSHOT + 12.14.0-SNAPSHOT pom ebean parent diff --git a/querybean-generator/pom.xml b/querybean-generator/pom.xml index ef25adaa8..10b8924c4 100644 --- a/querybean-generator/pom.xml +++ b/querybean-generator/pom.xml @@ -4,7 +4,7 @@ ebean-parent io.ebean - 12.13.3-SNAPSHOT + 12.14.0-SNAPSHOT querybean generator diff --git a/tests/test-java16/pom.xml b/tests/test-java16/pom.xml index c57560c1f..7a63e4a50 100644 --- a/tests/test-java16/pom.xml +++ b/tests/test-java16/pom.xml @@ -20,7 +20,7 @@ io.ebean ebean - 12.13.3-SNAPSHOT + 12.14.0-SNAPSHOT @@ -32,7 +32,7 @@ io.ebean ebean-test - 12.13.3-SNAPSHOT + 12.14.0-SNAPSHOT test @@ -58,7 +58,7 @@ io.ebean querybean-generator - 12.13.3-SNAPSHOT + 12.14.0-SNAPSHOT diff --git a/tests/test-kotlin/pom.xml b/tests/test-kotlin/pom.xml index 39edcf47b..2396a2a3f 100644 --- a/tests/test-kotlin/pom.xml +++ b/tests/test-kotlin/pom.xml @@ -36,14 +36,14 @@ io.ebean ebean-test - 12.13.3-SNAPSHOT + 12.14.0-SNAPSHOT test io.ebean ebean-core - 12.13.3-SNAPSHOT + 12.14.0-SNAPSHOT test From c3320f4a0b45295c1bcaa69f584482a4c83a19ce Mon Sep 17 00:00:00 2001 From: Rob Bygrave Date: Mon, 20 Dec 2021 13:14:34 +1300 Subject: [PATCH 09/17] Bump version to 12.14.0-SNAPSHOT --- kotlin-querybean-generator/pom.xml | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/kotlin-querybean-generator/pom.xml b/kotlin-querybean-generator/pom.xml index e897804e2..c4ced8ef9 100644 --- a/kotlin-querybean-generator/pom.xml +++ b/kotlin-querybean-generator/pom.xml @@ -4,7 +4,7 @@ ebean-parent io.ebean - 12.13.3-SNAPSHOT + 12.14.0-SNAPSHOT kotlin querybean generator @@ -29,7 +29,7 @@ io.ebean ebean-querybean - 12.13.3-SNAPSHOT + 12.14.0-SNAPSHOT test @@ -43,7 +43,7 @@ io.ebean ebean-core - 12.13.3-SNAPSHOT + 12.14.0-SNAPSHOT test @@ -64,7 +64,7 @@ io.ebean ebean-ddl-generator - 12.13.3-SNAPSHOT + 12.14.0-SNAPSHOT test @@ -106,7 +106,7 @@ io.ebean kotlin-querybean-generator - 12.8.2 + 12.13.0 From 361df6732a87ebbe4380faf643477d6113fc1721 Mon Sep 17 00:00:00 2001 From: Rob Bygrave Date: Mon, 20 Dec 2021 15:49:58 +1300 Subject: [PATCH 10/17] #2472 - BeanPersistController and isCascade() for delete requests (following #2458) --- .../server/persist/DefaultPersister.java | 25 ++++++++++++++----- .../basic/event/TestPreInsertValidation.java | 16 ++++++++++-- .../org/tests/model/basic/TWithPreInsert.java | 4 +-- .../model/basic/TWithPreInsertCommon.java | 2 ++ .../event/TWithPreInsertPersistAdapter.java | 15 +++++++++++ 5 files changed, 52 insertions(+), 10 deletions(-) diff --git a/ebean-core/src/main/java/io/ebeaninternal/server/persist/DefaultPersister.java b/ebean-core/src/main/java/io/ebeaninternal/server/persist/DefaultPersister.java index f2c56db74..701b76402 100644 --- a/ebean-core/src/main/java/io/ebeaninternal/server/persist/DefaultPersister.java +++ b/ebean-core/src/main/java/io/ebeaninternal/server/persist/DefaultPersister.java @@ -333,6 +333,13 @@ public final class DefaultPersister implements Persister { * Recursively delete the bean. This calls back to the EbeanServer. */ private int deleteRecurse(EntityBean detailBean, Transaction t, DeleteMode deleteMode) { + return deleteRequest(createDeleteCascade(detailBean, t, deleteMode.persistType())); + } + + /** + * Delete without being a cascade. + */ + private int delete(EntityBean detailBean, Transaction t, DeleteMode deleteMode) { return deleteRequest(createDeleteRequest(detailBean, t, deleteMode.persistType())); } @@ -560,7 +567,7 @@ public final class DefaultPersister implements Persister { } } - private void deleteList(List beanList, SpiTransaction t, DeleteMode deleteMode, boolean children) { + private void deleteCascade(List beanList, SpiTransaction t, DeleteMode deleteMode, boolean children) { if (children) { t.depth(-1); t.checkBatchEscalationOnCollection(); @@ -604,7 +611,7 @@ public final class DefaultPersister implements Persister { for (Object id : ids) { EntityBean bean = descriptor.createEntityBean(); descriptor.convertSetId(id, bean); - int rowCount = deleteRecurse(bean, transaction, deleteMode); + int rowCount = delete(bean, transaction, deleteMode); if (rowCount == -1) { total = -1; } else if (total != -1) { @@ -656,7 +663,7 @@ public final class DefaultPersister implements Persister { t.logSummary("-- DeleteById of " + descriptor.name() + " ids[" + idList + "] requires fetch of foreign key values"); } List beanList = server.findList(q, t); - deleteList(beanList, t, deleteMode, false); + deleteCascade(beanList, t, deleteMode, false); return beanList.size(); } else { @@ -994,6 +1001,8 @@ public final class DefaultPersister implements Persister { executeSqlUpdate(sqlDelete, t); } else { + // TODO: Review first checking if many property is loaded and using the loaded beans + // ... and only using findIdsByParentId() when the many property isn't loaded // Delete recurse using the Id values of the children Object parentId = desc.getId(parentBean); List idsByParentId = many.findIdsByParentId(parentId, null, t, excludeDetailIds, deleteMode.isHard()); @@ -1017,7 +1026,7 @@ public final class DefaultPersister implements Persister { for (Object id : childIds) { refList.add(targetDesc.createReference(id, null)); } - deleteList(refList, t, deleteMode, true); + deleteCascade(refList, t, deleteMode, true); } else { // perform delete by statement if possible delete(targetDesc, null, childIds, t, deleteMode); @@ -1157,6 +1166,10 @@ public final class DefaultPersister implements Persister { return createDeleteRequest(bean, t, type, Flags.ZERO); } + private PersistRequestBean createDeleteCascade(EntityBean bean, Transaction t, Type type) { + return createDeleteRequest(bean, t, type, Flags.RECURSE); + } + @SuppressWarnings({"unchecked"}) private PersistRequestBean createDeleteRequest(Object bean, Transaction t, PersistRequest.Type type, int flags) { BeanManager mgr = beanManager(bean.getClass()); @@ -1167,7 +1180,7 @@ public final class DefaultPersister implements Persister { type = Type.DELETE_SOFT; } - PersistRequestBean request = new PersistRequestBean<>(server, (T)bean, null, mgr, (SpiTransaction) t, persistExecute, type, flags); + PersistRequestBean request = new PersistRequestBean<>(server, (T) bean, null, mgr, (SpiTransaction) t, persistExecute, type, flags); request.initForSoftDelete(); return request; } @@ -1186,7 +1199,7 @@ public final class DefaultPersister implements Persister { */ @SuppressWarnings("unchecked") private BeanManager beanManager(Class cls) { - BeanManager mgr = (BeanManager)beanDescriptorManager.beanManager(cls); + BeanManager mgr = (BeanManager) beanDescriptorManager.beanManager(cls); if (mgr == null) { throw new PersistenceException(errNotRegistered(cls)); } diff --git a/ebean-test/src/test/java/org/tests/basic/event/TestPreInsertValidation.java b/ebean-test/src/test/java/org/tests/basic/event/TestPreInsertValidation.java index c67e63c4a..8b86b1f87 100644 --- a/ebean-test/src/test/java/org/tests/basic/event/TestPreInsertValidation.java +++ b/ebean-test/src/test/java/org/tests/basic/event/TestPreInsertValidation.java @@ -6,6 +6,7 @@ import io.ebean.DB; import org.junit.jupiter.api.Test; import org.tests.model.basic.TWithPreInsert; import org.tests.model.basic.TWithPreInsertChild; +import org.tests.model.basic.event.TWithPreInsertPersistAdapter; import static org.assertj.core.api.Assertions.assertThat; import static org.junit.jupiter.api.Assertions.assertNotNull; @@ -27,6 +28,7 @@ class TestPreInsertValidation extends BaseTestCase { assertThat(e.requestCascadeState()).isEqualTo(2); TWithPreInsert e1 = DB.find(TWithPreInsert.class, e.getId()); + assert e1 != null; e1.setTitle("Missus"); DB.save(e1); @@ -54,11 +56,21 @@ class TestPreInsertValidation extends BaseTestCase { assert e1 != null; e1.setTitle("ParentCascading-changed"); - e1.children().get(0).setName("Child0-changed"); + TWithPreInsertChild childBean = e1.children().get(0); + childBean.setName("Child0-changed"); DB.save(e1); assertThat(e1.requestCascadeState()).isEqualTo(12); - assertThat(e1.children().get(0).requestCascadeState()).isEqualTo(11); + assertThat(childBean.requestCascadeState()).isEqualTo(11); + + DB.delete(e1); + + assertThat(e1.requestCascadeState()).isEqualTo(22); + + // assert that isCascade() was true for the child bean + assertThat(TWithPreInsertPersistAdapter.cascadeDelete).hasSize(1); + String deleteCascade = TWithPreInsertPersistAdapter.cascadeDelete.get(0); + assertThat(deleteCascade).isEqualTo("class org.tests.model.basic.TWithPreInsertChild:1"); } @Test diff --git a/ebean-test/src/test/java/org/tests/model/basic/TWithPreInsert.java b/ebean-test/src/test/java/org/tests/model/basic/TWithPreInsert.java index 21398bc7a..acfffce20 100644 --- a/ebean-test/src/test/java/org/tests/model/basic/TWithPreInsert.java +++ b/ebean-test/src/test/java/org/tests/model/basic/TWithPreInsert.java @@ -7,7 +7,7 @@ import javax.validation.constraints.NotNull; import java.util.ArrayList; import java.util.List; -import static javax.persistence.CascadeType.PERSIST; +import static javax.persistence.CascadeType.ALL; @Entity public class TWithPreInsert implements TWithPreInsertCommon { @@ -20,7 +20,7 @@ public class TWithPreInsert implements TWithPreInsertCommon { private String title; - @OneToMany(cascade = PERSIST) + @OneToMany(cascade = ALL) private List children = new ArrayList<>(); /** diff --git a/ebean-test/src/test/java/org/tests/model/basic/TWithPreInsertCommon.java b/ebean-test/src/test/java/org/tests/model/basic/TWithPreInsertCommon.java index dc61e28ba..632c7ade9 100644 --- a/ebean-test/src/test/java/org/tests/model/basic/TWithPreInsertCommon.java +++ b/ebean-test/src/test/java/org/tests/model/basic/TWithPreInsertCommon.java @@ -2,6 +2,8 @@ package org.tests.model.basic; public interface TWithPreInsertCommon { + Integer getId(); + String getName(); void setName(String name); diff --git a/ebean-test/src/test/java/org/tests/model/basic/event/TWithPreInsertPersistAdapter.java b/ebean-test/src/test/java/org/tests/model/basic/event/TWithPreInsertPersistAdapter.java index 03143d385..ffc87e00a 100644 --- a/ebean-test/src/test/java/org/tests/model/basic/event/TWithPreInsertPersistAdapter.java +++ b/ebean-test/src/test/java/org/tests/model/basic/event/TWithPreInsertPersistAdapter.java @@ -4,8 +4,13 @@ import io.ebean.event.BeanPersistAdapter; import io.ebean.event.BeanPersistRequest; import org.tests.model.basic.TWithPreInsertCommon; +import java.util.ArrayList; +import java.util.List; + public class TWithPreInsertPersistAdapter extends BeanPersistAdapter { + public static List cascadeDelete = new ArrayList<>(); + @Override public boolean isRegisterFor(Class cls) { return TWithPreInsertCommon.class.isAssignableFrom(cls); @@ -32,4 +37,14 @@ public class TWithPreInsertPersistAdapter extends BeanPersistAdapter { return super.preUpdate(request); } + @Override + public boolean preDelete(BeanPersistRequest request) { + TWithPreInsertCommon bean = (TWithPreInsertCommon) request.bean(); + if (request.isCascade()) { + cascadeDelete.add(bean.getClass() + ":" + bean.getId()); + } else { + bean.requestCascadeState(22); + } + return true; + } } From 678494f331740f2083a85b6aa4d3e5d073b45e1f Mon Sep 17 00:00:00 2001 From: Rob Bygrave Date: Mon, 20 Dec 2021 16:09:33 +1300 Subject: [PATCH 11/17] Bump version of logback used in tests only --- ebean-test/pom.xml | 2 +- pom.xml | 2 +- tests/test-java16/pom.xml | 2 +- tests/test-kotlin/pom.xml | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/ebean-test/pom.xml b/ebean-test/pom.xml index 849d741f3..faa5c31e2 100644 --- a/ebean-test/pom.xml +++ b/ebean-test/pom.xml @@ -226,7 +226,7 @@ ch.qos.logback logback-classic - 1.2.3 + 1.2.9 test diff --git a/pom.xml b/pom.xml index 5daf59b3a..0a674062c 100644 --- a/pom.xml +++ b/pom.xml @@ -61,7 +61,7 @@ ch.qos.logback logback-classic - 1.2.3 + 1.2.9 test diff --git a/tests/test-java16/pom.xml b/tests/test-java16/pom.xml index 7a63e4a50..b8408ed0c 100644 --- a/tests/test-java16/pom.xml +++ b/tests/test-java16/pom.xml @@ -26,7 +26,7 @@ ch.qos.logback logback-classic - 1.2.3 + 1.2.9 diff --git a/tests/test-kotlin/pom.xml b/tests/test-kotlin/pom.xml index 2396a2a3f..32d477dfe 100644 --- a/tests/test-kotlin/pom.xml +++ b/tests/test-kotlin/pom.xml @@ -50,7 +50,7 @@ ch.qos.logback logback-classic - 1.2.3 + 1.2.9 test From 42594533daad43e83dc64368e4b3f48330a45399 Mon Sep 17 00:00:00 2001 From: tFellner Date: Mon, 20 Dec 2021 04:11:30 +0100 Subject: [PATCH 12/17] Support for Sequences in MariaDB (#2304) * Support for Sequneces in MariaDB * clean up readSequenceValue in test class * remove flakiness * remove change for later discussion * replace deprecated methods * strictly allow sequences --- .../dbplatform/mariadb/MariaDbPlatform.java | 12 ++++ .../dbplatform/mariadb/MariaDbSequence.java | 24 ++++++++ .../org/tests/idkeys/TestGeneratedKeys.java | 61 +++++++++++++++---- 3 files changed, 85 insertions(+), 12 deletions(-) create mode 100644 ebean-api/src/main/java/io/ebean/config/dbplatform/mariadb/MariaDbSequence.java diff --git a/ebean-api/src/main/java/io/ebean/config/dbplatform/mariadb/MariaDbPlatform.java b/ebean-api/src/main/java/io/ebean/config/dbplatform/mariadb/MariaDbPlatform.java index 082f31c11..0abdef7bd 100644 --- a/ebean-api/src/main/java/io/ebean/config/dbplatform/mariadb/MariaDbPlatform.java +++ b/ebean-api/src/main/java/io/ebean/config/dbplatform/mariadb/MariaDbPlatform.java @@ -1,6 +1,10 @@ package io.ebean.config.dbplatform.mariadb; +import javax.sql.DataSource; + +import io.ebean.BackgroundExecutor; import io.ebean.annotation.Platform; +import io.ebean.config.dbplatform.PlatformIdGenerator; import io.ebean.config.dbplatform.mysql.BaseMySqlPlatform; /** @@ -11,6 +15,14 @@ public class MariaDbPlatform extends BaseMySqlPlatform { public MariaDbPlatform() { super(); this.platform = Platform.MARIADB; + this.sequenceBatchMode = false; this.historySupport = new MariaDbHistorySupport(); + this.dbIdentity.setSupportsSequence(true); } + + @Override + public PlatformIdGenerator createSequenceIdGenerator(BackgroundExecutor be, DataSource ds, int stepSize, String seqName) { + return new MariaDbSequence(be, ds, seqName, stepSize); + } + } diff --git a/ebean-api/src/main/java/io/ebean/config/dbplatform/mariadb/MariaDbSequence.java b/ebean-api/src/main/java/io/ebean/config/dbplatform/mariadb/MariaDbSequence.java new file mode 100644 index 000000000..c6350213f --- /dev/null +++ b/ebean-api/src/main/java/io/ebean/config/dbplatform/mariadb/MariaDbSequence.java @@ -0,0 +1,24 @@ +package io.ebean.config.dbplatform.mariadb; + +import io.ebean.BackgroundExecutor; +import io.ebean.config.dbplatform.SequenceStepIdGenerator; + +import javax.sql.DataSource; + +public class MariaDbSequence extends SequenceStepIdGenerator { + + private final String nextSql; + + /** + * Construct where batchSize is the sequence step size. + */ + public MariaDbSequence(BackgroundExecutor be, DataSource ds, String seqName, int stepSize) { + super(be, ds, seqName, stepSize); + this.nextSql = "select next value for " + seqName; + } + + @Override + public String getSql(int batchSize) { + return nextSql; + } +} diff --git a/ebean-test/src/test/java/org/tests/idkeys/TestGeneratedKeys.java b/ebean-test/src/test/java/org/tests/idkeys/TestGeneratedKeys.java index 56245930c..8f57569a0 100644 --- a/ebean-test/src/test/java/org/tests/idkeys/TestGeneratedKeys.java +++ b/ebean-test/src/test/java/org/tests/idkeys/TestGeneratedKeys.java @@ -14,6 +14,8 @@ import org.tests.idkeys.db.GenKeySeqB; import java.sql.ResultSet; import java.sql.SQLException; import java.sql.Statement; +import java.util.ArrayList; +import java.util.List; import static org.junit.jupiter.api.Assertions.*; import static org.junit.jupiter.api.Assumptions.assumeTrue; @@ -24,6 +26,7 @@ public class TestGeneratedKeys extends BaseTestCase { @ForPlatform(Platform.H2) // readSequenceValue is H2 specific public void testGenKeySeqA() throws SQLException { assumeTrue(idType() == IdType.SEQUENCE); + SpiEbeanServer server = spiEbeanServer(); try (Transaction tx = server.beginTransaction()) { @@ -69,20 +72,34 @@ public class TestGeneratedKeys extends BaseTestCase { } private long readSequenceValue(Transaction tx, String sequence) throws SQLException { - Statement stm = null; - try { - stm = tx.connection().createStatement(); - ResultSet rs = stm.executeQuery("select currval('" + sequence + "')"); - rs.next(); + String sql; + switch (spiEbeanServer().databasePlatform().getPlatform().base()) { + case H2 : + sql = "select currval('" + sequence + "')"; + break; + case DB2 : + sql = "values previous value for " + sequence; + + break; + case SQLSERVER : + sql = "select current_value from sys.sequences where name = '" + sequence + "'"; + break; + + case MARIADB : + throw new UnsupportedOperationException("reading sequence value outside of the current connection is not supported. " + + "See https://mariadb.com/kb/en/previous-value-for-sequence_name/#description"); + + default : + throw new UnsupportedOperationException("reading sequence value from " + + spiEbeanServer().databasePlatform().getPlatform() + + " is not supported."); + + } + try (Statement stm = tx.connection().createStatement()) { + ResultSet rs = stm.executeQuery(sql); + rs.next(); return rs.getLong(1); - } finally { - if (stm != null) { - try { - stm.close(); - } catch (SQLException e) { - } - } } } @@ -109,5 +126,25 @@ public class TestGeneratedKeys extends BaseTestCase { assertNotNull(al.getId()); } } + + @Test + @ForPlatform({Platform.H2, Platform.MARIADB, Platform.SQLSERVER, Platform.DB2}) + public void testGeneratedKeys() throws SQLException { + assumeTrue(idType() == IdType.SEQUENCE); + + SpiEbeanServer server = spiEbeanServer(); + List idList = new ArrayList<>(52); + + try (Transaction tx = server.beginTransaction()) { + // bigger than increment + for (int i = 1; i < 52; i++) { + GenKeySeqA gks = new GenKeySeqA(); + gks.setDescription("my description " + i); + server.save(gks); + assertFalse(idList.contains(gks.getId())); + idList.add(gks.getId()); + } + } + } } From 2ff3b0acb7fbe879b97763bc3768f1594af3f44a Mon Sep 17 00:00:00 2001 From: Rob Bygrave Date: Mon, 20 Dec 2021 16:20:08 +1300 Subject: [PATCH 13/17] Update gitflow cron schedule for mariadb, sqlserver, jdk-18 --- .github/workflows/jdk-18-ea.yml | 4 ++-- .github/workflows/mariadb-10.6.yml | 5 ++++- .github/workflows/sqlserver-2017-latest.yml | 5 ++++- 3 files changed, 10 insertions(+), 4 deletions(-) diff --git a/.github/workflows/jdk-18-ea.yml b/.github/workflows/jdk-18-ea.yml index 73121f1d4..b814c77c9 100644 --- a/.github/workflows/jdk-18-ea.yml +++ b/.github/workflows/jdk-18-ea.yml @@ -3,8 +3,8 @@ name: JDK 18-ea on: workflow_dispatch: -# schedule: -# - cron: '30 6 * * *' + schedule: + - cron: '30 6 * * 1,3,5' jobs: build: diff --git a/.github/workflows/mariadb-10.6.yml b/.github/workflows/mariadb-10.6.yml index 797e948ff..cae97ac27 100644 --- a/.github/workflows/mariadb-10.6.yml +++ b/.github/workflows/mariadb-10.6.yml @@ -1,7 +1,10 @@ name: MariaDB 10.6 -on: [workflow_dispatch] +on: + workflow_dispatch: + schedule: + - cron: '10 7 * * 1,4' jobs: build: diff --git a/.github/workflows/sqlserver-2017-latest.yml b/.github/workflows/sqlserver-2017-latest.yml index 83649d080..6c72d8980 100644 --- a/.github/workflows/sqlserver-2017-latest.yml +++ b/.github/workflows/sqlserver-2017-latest.yml @@ -1,7 +1,10 @@ name: SqlServer 2017 latest -on: [workflow_dispatch] +on: + workflow_dispatch: + schedule: + - cron: '10 7 * * 2,5' jobs: build: From 451e2fa93c93c3c9bb41a27c0f09db5ebb7183b7 Mon Sep 17 00:00:00 2001 From: Rob Bygrave Date: Mon, 20 Dec 2021 16:34:17 +1300 Subject: [PATCH 14/17] [maven-release-plugin] prepare release ebean-parent-12.14.0 --- ebean-api/pom.xml | 2 +- ebean-autotune/pom.xml | 6 +++--- ebean-bom/pom.xml | 30 +++++++++++++++--------------- ebean-core-type/pom.xml | 4 ++-- ebean-core/pom.xml | 10 +++++----- ebean-ddl-generator/pom.xml | 6 +++--- ebean-externalmapping-api/pom.xml | 2 +- ebean-externalmapping-xml/pom.xml | 10 +++++----- ebean-postgis/pom.xml | 6 +++--- ebean-querybean/pom.xml | 10 +++++----- ebean-redis/pom.xml | 12 ++++++------ ebean-test/pom.xml | 6 +++--- ebean/pom.xml | 8 ++++---- kotlin-querybean-generator/pom.xml | 8 ++++---- pom.xml | 4 ++-- querybean-generator/pom.xml | 2 +- 16 files changed, 63 insertions(+), 63 deletions(-) diff --git a/ebean-api/pom.xml b/ebean-api/pom.xml index 023284e51..b71326907 100644 --- a/ebean-api/pom.xml +++ b/ebean-api/pom.xml @@ -4,7 +4,7 @@ ebean-parent io.ebean - 12.14.0-SNAPSHOT + 12.14.0 ebean api diff --git a/ebean-autotune/pom.xml b/ebean-autotune/pom.xml index a9ff0d9be..5297bb15c 100644 --- a/ebean-autotune/pom.xml +++ b/ebean-autotune/pom.xml @@ -4,7 +4,7 @@ ebean-parent io.ebean - 12.14.0-SNAPSHOT + 12.14.0 @@ -14,7 +14,7 @@ scm:git:git@github.com:ebean-orm/ebean.git - HEAD + ebean-parent-12.14.0 ebean autotune @@ -26,7 +26,7 @@ io.ebean ebean-core - 12.14.0-SNAPSHOT + 12.14.0 provided diff --git a/ebean-bom/pom.xml b/ebean-bom/pom.xml index 55df93398..699da8c0f 100644 --- a/ebean-bom/pom.xml +++ b/ebean-bom/pom.xml @@ -4,7 +4,7 @@ ebean-parent io.ebean - 12.14.0-SNAPSHOT + 12.14.0 ebean bom @@ -71,88 +71,88 @@ io.ebean ebean - 12.14.0-SNAPSHOT + 12.14.0 io.ebean ebean-api - 12.14.0-SNAPSHOT + 12.14.0 io.ebean ebean-core - 12.14.0-SNAPSHOT + 12.14.0 io.ebean ebean-core-type - 12.14.0-SNAPSHOT + 12.14.0 io.ebean ebean-ddl-generator - 12.14.0-SNAPSHOT + 12.14.0 io.ebean ebean-externalmapping-api - 12.14.0-SNAPSHOT + 12.14.0 io.ebean ebean-externalmapping-xml - 12.14.0-SNAPSHOT + 12.14.0 io.ebean ebean-autotune - 12.14.0-SNAPSHOT + 12.14.0 io.ebean ebean-querybean - 12.14.0-SNAPSHOT + 12.14.0 io.ebean querybean-generator - 12.14.0-SNAPSHOT + 12.14.0 provided io.ebean kotlin-querybean-generator - 12.14.0-SNAPSHOT + 12.14.0 provided io.ebean ebean-test - 12.14.0-SNAPSHOT + 12.14.0 test io.ebean ebean-postgis - 12.14.0-SNAPSHOT + 12.14.0 io.ebean ebean-redis - 12.14.0-SNAPSHOT + 12.14.0 diff --git a/ebean-core-type/pom.xml b/ebean-core-type/pom.xml index 969353969..1531bb875 100644 --- a/ebean-core-type/pom.xml +++ b/ebean-core-type/pom.xml @@ -4,7 +4,7 @@ ebean-parent io.ebean - 12.14.0-SNAPSHOT + 12.14.0 ebean-core-type @@ -16,7 +16,7 @@ io.ebean ebean-api - 12.14.0-SNAPSHOT + 12.14.0 diff --git a/ebean-core/pom.xml b/ebean-core/pom.xml index 99591b3bc..650acc7f0 100644 --- a/ebean-core/pom.xml +++ b/ebean-core/pom.xml @@ -3,7 +3,7 @@ ebean-parent io.ebean - 12.14.0-SNAPSHOT + 12.14.0 ebean-core @@ -15,7 +15,7 @@ scm:git:git@github.com:ebean-orm/ebean.git - HEAD + ebean-parent-12.14.0 @@ -41,19 +41,19 @@ io.ebean ebean-api - 12.14.0-SNAPSHOT + 12.14.0 io.ebean ebean-core-type - 12.14.0-SNAPSHOT + 12.14.0 io.ebean ebean-externalmapping-api - 12.14.0-SNAPSHOT + 12.14.0 diff --git a/ebean-ddl-generator/pom.xml b/ebean-ddl-generator/pom.xml index ca5834e2c..673bb3efe 100644 --- a/ebean-ddl-generator/pom.xml +++ b/ebean-ddl-generator/pom.xml @@ -4,7 +4,7 @@ ebean-parent io.ebean - 12.14.0-SNAPSHOT + 12.14.0 ebean ddl generation @@ -28,14 +28,14 @@ io.ebean ebean-core-type - 12.14.0-SNAPSHOT + 12.14.0 provided io.ebean ebean-core - 12.14.0-SNAPSHOT + 12.14.0 provided diff --git a/ebean-externalmapping-api/pom.xml b/ebean-externalmapping-api/pom.xml index df664cb16..c0db68dc1 100644 --- a/ebean-externalmapping-api/pom.xml +++ b/ebean-externalmapping-api/pom.xml @@ -4,7 +4,7 @@ ebean-parent io.ebean - 12.14.0-SNAPSHOT + 12.14.0 ebean external mapping api diff --git a/ebean-externalmapping-xml/pom.xml b/ebean-externalmapping-xml/pom.xml index adc50c0a5..0f26c4d89 100644 --- a/ebean-externalmapping-xml/pom.xml +++ b/ebean-externalmapping-xml/pom.xml @@ -4,7 +4,7 @@ ebean-parent io.ebean - 12.14.0-SNAPSHOT + 12.14.0 @@ -14,7 +14,7 @@ scm:git:git@github.com:ebean-orm/ebean.git - HEAD + ebean-parent-12.14.0 ebean external mapping xml @@ -33,7 +33,7 @@ io.ebean ebean-externalmapping-api - 12.14.0-SNAPSHOT + 12.14.0 @@ -59,14 +59,14 @@ io.ebean ebean-core - 12.14.0-SNAPSHOT + 12.14.0 test io.ebean ebean-ddl-generator - 12.14.0-SNAPSHOT + 12.14.0 test diff --git a/ebean-postgis/pom.xml b/ebean-postgis/pom.xml index ed40a6aac..c2931772a 100644 --- a/ebean-postgis/pom.xml +++ b/ebean-postgis/pom.xml @@ -4,7 +4,7 @@ ebean-parent io.ebean - 12.14.0-SNAPSHOT + 12.14.0 ebean postgis @@ -23,7 +23,7 @@ io.ebean ebean-core - 12.14.0-SNAPSHOT + 12.14.0 provided @@ -74,7 +74,7 @@ io.ebean ebean-test - 12.14.0-SNAPSHOT + 12.14.0 test diff --git a/ebean-querybean/pom.xml b/ebean-querybean/pom.xml index a083f762b..9d339ff1a 100644 --- a/ebean-querybean/pom.xml +++ b/ebean-querybean/pom.xml @@ -4,7 +4,7 @@ ebean-parent io.ebean - 12.14.0-SNAPSHOT + 12.14.0 ebean querybean @@ -17,7 +17,7 @@ io.ebean ebean-core - 12.14.0-SNAPSHOT + 12.14.0 provided @@ -56,21 +56,21 @@ io.ebean ebean-ddl-generator - 12.14.0-SNAPSHOT + 12.14.0 test io.ebean querybean-generator - 12.14.0-SNAPSHOT + 12.14.0 test io.ebean ebean-test - 12.14.0-SNAPSHOT + 12.14.0 test diff --git a/ebean-redis/pom.xml b/ebean-redis/pom.xml index 56bb8bcdb..6205759cd 100644 --- a/ebean-redis/pom.xml +++ b/ebean-redis/pom.xml @@ -4,7 +4,7 @@ ebean-parent io.ebean - 12.14.0-SNAPSHOT + 12.14.0 ebean-redis @@ -22,35 +22,35 @@ io.ebean ebean-api - 12.14.0-SNAPSHOT + 12.14.0 provided io.ebean ebean-core - 12.14.0-SNAPSHOT + 12.14.0 provided io.ebean ebean-querybean - 12.14.0-SNAPSHOT + 12.14.0 test io.ebean querybean-generator - 12.14.0-SNAPSHOT + 12.14.0 test io.ebean ebean-test - 12.14.0-SNAPSHOT + 12.14.0 test diff --git a/ebean-test/pom.xml b/ebean-test/pom.xml index faa5c31e2..da200d0a1 100644 --- a/ebean-test/pom.xml +++ b/ebean-test/pom.xml @@ -4,7 +4,7 @@ ebean-parent io.ebean - 12.14.0-SNAPSHOT + 12.14.0 ebean test @@ -29,14 +29,14 @@ io.ebean ebean-core - 12.14.0-SNAPSHOT + 12.14.0 provided io.ebean ebean-ddl-generator - 12.14.0-SNAPSHOT + 12.14.0 diff --git a/ebean/pom.xml b/ebean/pom.xml index cf41c4d90..a3ffe3f6c 100644 --- a/ebean/pom.xml +++ b/ebean/pom.xml @@ -4,7 +4,7 @@ ebean-parent io.ebean - 12.14.0-SNAPSHOT + 12.14.0 ebean composite @@ -22,20 +22,20 @@ io.ebean ebean-api - 12.14.0-SNAPSHOT + 12.14.0 io.ebean ebean-core - 12.14.0-SNAPSHOT + 12.14.0 io.ebean ebean-querybean - 12.14.0-SNAPSHOT + 12.14.0 diff --git a/kotlin-querybean-generator/pom.xml b/kotlin-querybean-generator/pom.xml index c4ced8ef9..43b4f33fd 100644 --- a/kotlin-querybean-generator/pom.xml +++ b/kotlin-querybean-generator/pom.xml @@ -4,7 +4,7 @@ ebean-parent io.ebean - 12.14.0-SNAPSHOT + 12.14.0 kotlin querybean generator @@ -29,7 +29,7 @@ io.ebean ebean-querybean - 12.14.0-SNAPSHOT + 12.14.0 test @@ -43,7 +43,7 @@ io.ebean ebean-core - 12.14.0-SNAPSHOT + 12.14.0 test @@ -64,7 +64,7 @@ io.ebean ebean-ddl-generator - 12.14.0-SNAPSHOT + 12.14.0 test diff --git a/pom.xml b/pom.xml index 0a674062c..33caf79b2 100644 --- a/pom.xml +++ b/pom.xml @@ -9,7 +9,7 @@ io.ebean ebean-parent - 12.14.0-SNAPSHOT + 12.14.0 pom ebean parent @@ -18,7 +18,7 @@ scm:git:git@github.com:ebean-orm/ebean.git - HEAD + ebean-parent-12.14.0 diff --git a/querybean-generator/pom.xml b/querybean-generator/pom.xml index 10b8924c4..dbc86adb8 100644 --- a/querybean-generator/pom.xml +++ b/querybean-generator/pom.xml @@ -4,7 +4,7 @@ ebean-parent io.ebean - 12.14.0-SNAPSHOT + 12.14.0 querybean generator From 3f645211a6fac68d0bffa7650b420e69a9d4bc69 Mon Sep 17 00:00:00 2001 From: Rob Bygrave Date: Mon, 20 Dec 2021 16:34:23 +1300 Subject: [PATCH 15/17] [maven-release-plugin] prepare for next development iteration --- ebean-api/pom.xml | 2 +- ebean-autotune/pom.xml | 6 +++--- ebean-bom/pom.xml | 30 +++++++++++++++--------------- ebean-core-type/pom.xml | 4 ++-- ebean-core/pom.xml | 10 +++++----- ebean-ddl-generator/pom.xml | 6 +++--- ebean-externalmapping-api/pom.xml | 2 +- ebean-externalmapping-xml/pom.xml | 10 +++++----- ebean-postgis/pom.xml | 6 +++--- ebean-querybean/pom.xml | 10 +++++----- ebean-redis/pom.xml | 12 ++++++------ ebean-test/pom.xml | 6 +++--- ebean/pom.xml | 8 ++++---- kotlin-querybean-generator/pom.xml | 8 ++++---- pom.xml | 4 ++-- querybean-generator/pom.xml | 2 +- 16 files changed, 63 insertions(+), 63 deletions(-) diff --git a/ebean-api/pom.xml b/ebean-api/pom.xml index b71326907..ca0b583c5 100644 --- a/ebean-api/pom.xml +++ b/ebean-api/pom.xml @@ -4,7 +4,7 @@ ebean-parent io.ebean - 12.14.0 + 12.14.1-SNAPSHOT ebean api diff --git a/ebean-autotune/pom.xml b/ebean-autotune/pom.xml index 5297bb15c..dedf2e053 100644 --- a/ebean-autotune/pom.xml +++ b/ebean-autotune/pom.xml @@ -4,7 +4,7 @@ ebean-parent io.ebean - 12.14.0 + 12.14.1-SNAPSHOT @@ -14,7 +14,7 @@ scm:git:git@github.com:ebean-orm/ebean.git - ebean-parent-12.14.0 + HEAD ebean autotune @@ -26,7 +26,7 @@ io.ebean ebean-core - 12.14.0 + 12.14.1-SNAPSHOT provided diff --git a/ebean-bom/pom.xml b/ebean-bom/pom.xml index 699da8c0f..47f0f4ce4 100644 --- a/ebean-bom/pom.xml +++ b/ebean-bom/pom.xml @@ -4,7 +4,7 @@ ebean-parent io.ebean - 12.14.0 + 12.14.1-SNAPSHOT ebean bom @@ -71,88 +71,88 @@ io.ebean ebean - 12.14.0 + 12.14.1-SNAPSHOT io.ebean ebean-api - 12.14.0 + 12.14.1-SNAPSHOT io.ebean ebean-core - 12.14.0 + 12.14.1-SNAPSHOT io.ebean ebean-core-type - 12.14.0 + 12.14.1-SNAPSHOT io.ebean ebean-ddl-generator - 12.14.0 + 12.14.1-SNAPSHOT io.ebean ebean-externalmapping-api - 12.14.0 + 12.14.1-SNAPSHOT io.ebean ebean-externalmapping-xml - 12.14.0 + 12.14.1-SNAPSHOT io.ebean ebean-autotune - 12.14.0 + 12.14.1-SNAPSHOT io.ebean ebean-querybean - 12.14.0 + 12.14.1-SNAPSHOT io.ebean querybean-generator - 12.14.0 + 12.14.1-SNAPSHOT provided io.ebean kotlin-querybean-generator - 12.14.0 + 12.14.1-SNAPSHOT provided io.ebean ebean-test - 12.14.0 + 12.14.1-SNAPSHOT test io.ebean ebean-postgis - 12.14.0 + 12.14.1-SNAPSHOT io.ebean ebean-redis - 12.14.0 + 12.14.1-SNAPSHOT diff --git a/ebean-core-type/pom.xml b/ebean-core-type/pom.xml index 1531bb875..9eb1859c9 100644 --- a/ebean-core-type/pom.xml +++ b/ebean-core-type/pom.xml @@ -4,7 +4,7 @@ ebean-parent io.ebean - 12.14.0 + 12.14.1-SNAPSHOT ebean-core-type @@ -16,7 +16,7 @@ io.ebean ebean-api - 12.14.0 + 12.14.1-SNAPSHOT diff --git a/ebean-core/pom.xml b/ebean-core/pom.xml index 650acc7f0..89aa0e6e5 100644 --- a/ebean-core/pom.xml +++ b/ebean-core/pom.xml @@ -3,7 +3,7 @@ ebean-parent io.ebean - 12.14.0 + 12.14.1-SNAPSHOT ebean-core @@ -15,7 +15,7 @@ scm:git:git@github.com:ebean-orm/ebean.git - ebean-parent-12.14.0 + HEAD @@ -41,19 +41,19 @@ io.ebean ebean-api - 12.14.0 + 12.14.1-SNAPSHOT io.ebean ebean-core-type - 12.14.0 + 12.14.1-SNAPSHOT io.ebean ebean-externalmapping-api - 12.14.0 + 12.14.1-SNAPSHOT diff --git a/ebean-ddl-generator/pom.xml b/ebean-ddl-generator/pom.xml index 673bb3efe..6d009ead8 100644 --- a/ebean-ddl-generator/pom.xml +++ b/ebean-ddl-generator/pom.xml @@ -4,7 +4,7 @@ ebean-parent io.ebean - 12.14.0 + 12.14.1-SNAPSHOT ebean ddl generation @@ -28,14 +28,14 @@ io.ebean ebean-core-type - 12.14.0 + 12.14.1-SNAPSHOT provided io.ebean ebean-core - 12.14.0 + 12.14.1-SNAPSHOT provided diff --git a/ebean-externalmapping-api/pom.xml b/ebean-externalmapping-api/pom.xml index c0db68dc1..1f7620729 100644 --- a/ebean-externalmapping-api/pom.xml +++ b/ebean-externalmapping-api/pom.xml @@ -4,7 +4,7 @@ ebean-parent io.ebean - 12.14.0 + 12.14.1-SNAPSHOT ebean external mapping api diff --git a/ebean-externalmapping-xml/pom.xml b/ebean-externalmapping-xml/pom.xml index 0f26c4d89..d9727054a 100644 --- a/ebean-externalmapping-xml/pom.xml +++ b/ebean-externalmapping-xml/pom.xml @@ -4,7 +4,7 @@ ebean-parent io.ebean - 12.14.0 + 12.14.1-SNAPSHOT @@ -14,7 +14,7 @@ scm:git:git@github.com:ebean-orm/ebean.git - ebean-parent-12.14.0 + HEAD ebean external mapping xml @@ -33,7 +33,7 @@ io.ebean ebean-externalmapping-api - 12.14.0 + 12.14.1-SNAPSHOT @@ -59,14 +59,14 @@ io.ebean ebean-core - 12.14.0 + 12.14.1-SNAPSHOT test io.ebean ebean-ddl-generator - 12.14.0 + 12.14.1-SNAPSHOT test diff --git a/ebean-postgis/pom.xml b/ebean-postgis/pom.xml index c2931772a..3e6e22ede 100644 --- a/ebean-postgis/pom.xml +++ b/ebean-postgis/pom.xml @@ -4,7 +4,7 @@ ebean-parent io.ebean - 12.14.0 + 12.14.1-SNAPSHOT ebean postgis @@ -23,7 +23,7 @@ io.ebean ebean-core - 12.14.0 + 12.14.1-SNAPSHOT provided @@ -74,7 +74,7 @@ io.ebean ebean-test - 12.14.0 + 12.14.1-SNAPSHOT test diff --git a/ebean-querybean/pom.xml b/ebean-querybean/pom.xml index 9d339ff1a..e04cb19ea 100644 --- a/ebean-querybean/pom.xml +++ b/ebean-querybean/pom.xml @@ -4,7 +4,7 @@ ebean-parent io.ebean - 12.14.0 + 12.14.1-SNAPSHOT ebean querybean @@ -17,7 +17,7 @@ io.ebean ebean-core - 12.14.0 + 12.14.1-SNAPSHOT provided @@ -56,21 +56,21 @@ io.ebean ebean-ddl-generator - 12.14.0 + 12.14.1-SNAPSHOT test io.ebean querybean-generator - 12.14.0 + 12.14.1-SNAPSHOT test io.ebean ebean-test - 12.14.0 + 12.14.1-SNAPSHOT test diff --git a/ebean-redis/pom.xml b/ebean-redis/pom.xml index 6205759cd..5acd9874b 100644 --- a/ebean-redis/pom.xml +++ b/ebean-redis/pom.xml @@ -4,7 +4,7 @@ ebean-parent io.ebean - 12.14.0 + 12.14.1-SNAPSHOT ebean-redis @@ -22,35 +22,35 @@ io.ebean ebean-api - 12.14.0 + 12.14.1-SNAPSHOT provided io.ebean ebean-core - 12.14.0 + 12.14.1-SNAPSHOT provided io.ebean ebean-querybean - 12.14.0 + 12.14.1-SNAPSHOT test io.ebean querybean-generator - 12.14.0 + 12.14.1-SNAPSHOT test io.ebean ebean-test - 12.14.0 + 12.14.1-SNAPSHOT test diff --git a/ebean-test/pom.xml b/ebean-test/pom.xml index da200d0a1..4a2cdf3be 100644 --- a/ebean-test/pom.xml +++ b/ebean-test/pom.xml @@ -4,7 +4,7 @@ ebean-parent io.ebean - 12.14.0 + 12.14.1-SNAPSHOT ebean test @@ -29,14 +29,14 @@ io.ebean ebean-core - 12.14.0 + 12.14.1-SNAPSHOT provided io.ebean ebean-ddl-generator - 12.14.0 + 12.14.1-SNAPSHOT diff --git a/ebean/pom.xml b/ebean/pom.xml index a3ffe3f6c..751a7d829 100644 --- a/ebean/pom.xml +++ b/ebean/pom.xml @@ -4,7 +4,7 @@ ebean-parent io.ebean - 12.14.0 + 12.14.1-SNAPSHOT ebean composite @@ -22,20 +22,20 @@ io.ebean ebean-api - 12.14.0 + 12.14.1-SNAPSHOT io.ebean ebean-core - 12.14.0 + 12.14.1-SNAPSHOT io.ebean ebean-querybean - 12.14.0 + 12.14.1-SNAPSHOT diff --git a/kotlin-querybean-generator/pom.xml b/kotlin-querybean-generator/pom.xml index 43b4f33fd..da44acb28 100644 --- a/kotlin-querybean-generator/pom.xml +++ b/kotlin-querybean-generator/pom.xml @@ -4,7 +4,7 @@ ebean-parent io.ebean - 12.14.0 + 12.14.1-SNAPSHOT kotlin querybean generator @@ -29,7 +29,7 @@ io.ebean ebean-querybean - 12.14.0 + 12.14.1-SNAPSHOT test @@ -43,7 +43,7 @@ io.ebean ebean-core - 12.14.0 + 12.14.1-SNAPSHOT test @@ -64,7 +64,7 @@ io.ebean ebean-ddl-generator - 12.14.0 + 12.14.1-SNAPSHOT test diff --git a/pom.xml b/pom.xml index 33caf79b2..9d8573072 100644 --- a/pom.xml +++ b/pom.xml @@ -9,7 +9,7 @@ io.ebean ebean-parent - 12.14.0 + 12.14.1-SNAPSHOT pom ebean parent @@ -18,7 +18,7 @@ scm:git:git@github.com:ebean-orm/ebean.git - ebean-parent-12.14.0 + HEAD diff --git a/querybean-generator/pom.xml b/querybean-generator/pom.xml index dbc86adb8..3e50a4758 100644 --- a/querybean-generator/pom.xml +++ b/querybean-generator/pom.xml @@ -4,7 +4,7 @@ ebean-parent io.ebean - 12.14.0 + 12.14.1-SNAPSHOT querybean generator From 73896d375feee22354c94775c0cd4f216392d11c Mon Sep 17 00:00:00 2001 From: Rob Bygrave Date: Mon, 20 Dec 2021 16:49:18 +1300 Subject: [PATCH 16/17] Bump test modules to 12.14.1-SNAPSHOT after release --- ebean-kotlin/pom.xml | 6 +++--- tests/test-java16/pom.xml | 6 +++--- tests/test-kotlin/pom.xml | 4 ++-- 3 files changed, 8 insertions(+), 8 deletions(-) diff --git a/ebean-kotlin/pom.xml b/ebean-kotlin/pom.xml index c5c473f23..b9a3e50c4 100644 --- a/ebean-kotlin/pom.xml +++ b/ebean-kotlin/pom.xml @@ -5,7 +5,7 @@ ebean-parent io.ebean - 12.14.0-SNAPSHOT + 12.14.1-SNAPSHOT 4.0.0 @@ -29,7 +29,7 @@ io.ebean ebean-core - 12.14.0-SNAPSHOT + 12.14.1-SNAPSHOT provided @@ -51,7 +51,7 @@ io.ebean ebean-test - 12.14.0-SNAPSHOT + 12.14.1-SNAPSHOT test diff --git a/tests/test-java16/pom.xml b/tests/test-java16/pom.xml index b8408ed0c..302af2a2f 100644 --- a/tests/test-java16/pom.xml +++ b/tests/test-java16/pom.xml @@ -20,7 +20,7 @@ io.ebean ebean - 12.14.0-SNAPSHOT + 12.14.1-SNAPSHOT @@ -32,7 +32,7 @@ io.ebean ebean-test - 12.14.0-SNAPSHOT + 12.14.1-SNAPSHOT test @@ -58,7 +58,7 @@ io.ebean querybean-generator - 12.14.0-SNAPSHOT + 12.14.1-SNAPSHOT diff --git a/tests/test-kotlin/pom.xml b/tests/test-kotlin/pom.xml index 32d477dfe..5e65046dd 100644 --- a/tests/test-kotlin/pom.xml +++ b/tests/test-kotlin/pom.xml @@ -36,14 +36,14 @@ io.ebean ebean-test - 12.14.0-SNAPSHOT + 12.14.1-SNAPSHOT test io.ebean ebean-core - 12.14.0-SNAPSHOT + 12.14.1-SNAPSHOT test From 9ddf1333ed01470e204298a5f320434fba9113be Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?C=C3=A9dric=20Sougn=C3=A9?= Date: Thu, 23 Dec 2021 17:19:44 +0100 Subject: [PATCH 17/17] Fix locale problem with TestCsvReader and TestCsvReaderWithCallback. --- ebean-test/src/test/java/org/tests/text/csv/TestCsvReader.java | 3 ++- .../java/org/tests/text/csv/TestCsvReaderWithCallback.java | 3 ++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/ebean-test/src/test/java/org/tests/text/csv/TestCsvReader.java b/ebean-test/src/test/java/org/tests/text/csv/TestCsvReader.java index 313f5017c..5658d3263 100644 --- a/ebean-test/src/test/java/org/tests/text/csv/TestCsvReader.java +++ b/ebean-test/src/test/java/org/tests/text/csv/TestCsvReader.java @@ -10,6 +10,7 @@ import org.tests.model.basic.ResetBasicData; import java.io.File; import java.io.FileReader; import java.net.URL; +import java.util.Locale; public class TestCsvReader extends TransactionalTestCase { @@ -32,7 +33,7 @@ public class TestCsvReader extends TransactionalTestCase { // csvReader.addProperty("id"); csvReader.addProperty("status"); csvReader.addProperty("name"); - csvReader.addDateTime("anniversary", "dd-MMM-yyyy"); + csvReader.addDateTime("anniversary", "dd-MMM-yyyy", Locale.ENGLISH); csvReader.addProperty("billingAddress.line1"); csvReader.addProperty("billingAddress.city"); csvReader.addProperty("billingAddress.country.code"); diff --git a/ebean-test/src/test/java/org/tests/text/csv/TestCsvReaderWithCallback.java b/ebean-test/src/test/java/org/tests/text/csv/TestCsvReaderWithCallback.java index ef6bfd8c7..bd620401e 100644 --- a/ebean-test/src/test/java/org/tests/text/csv/TestCsvReaderWithCallback.java +++ b/ebean-test/src/test/java/org/tests/text/csv/TestCsvReaderWithCallback.java @@ -10,6 +10,7 @@ import org.tests.model.basic.Customer; import java.io.File; import java.io.FileReader; import java.net.URL; +import java.util.Locale; import static org.assertj.core.api.Assertions.assertThat; @@ -32,7 +33,7 @@ public class TestCsvReaderWithCallback extends TransactionalTestCase { // csvReader.addProperty("id"); csvReader.addProperty("status"); csvReader.addProperty("name"); - csvReader.addDateTime("anniversary", "dd-MMM-yyyy"); + csvReader.addDateTime("anniversary", "dd-MMM-yyyy", Locale.ENGLISH); csvReader.addProperty("billingAddress.line1"); csvReader.addProperty("billingAddress.city"); // processor.addReference("billingAddress.country.code");