8077 Commits
Author SHA1 Message Date
dependabot[bot] 18f1f90f04 Build(deps-dev): Bump com.fasterxml.jackson.core:jackson-databind (#3892)
Bumps [com.fasterxml.jackson.core:jackson-databind](https://github.com/FasterXML/jackson-databind) from 2.22.1 to 2.22.2.
- [Commits](https://github.com/FasterXML/jackson-databind/compare/jackson-databind-2.22.1...jackson-databind-2.22.2)

---
updated-dependencies:
- dependency-name: com.fasterxml.jackson.core:jackson-databind
  dependency-version: 2.22.2
  dependency-type: direct:development
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2026-10-11 22:31:30 +13:00
Rob Bygrave 9ea6197dff Fix DbArray support Non-native JSON-backed arrays for Integer (so MySQL, Oracle, SQLServer etc) (#3893)
Without this fix, a DbArray of List<Integer> on the plaforms that do NOT natively
support it like MySQL, Oracle, SQL Server fallback to a JSON array and this didn't
support all the specific types like Integer.

This adds the appropriate element converters when reading values, including Integer, Long, floating-point, BigDecimal, date/time, and UUID types. This prevents JSON numeric values from being returned as Long for List<Integer> properties.
2026-10-11 21:12:27 +13:00
Rob Bygraveandrobin.bygrave 95cf9c3ef0 Java 27 support - bump ebean-agent to 18.7.0 (or 19.7.0) via ASM 9.10.1 (#3890)
Ebean agent 18.7.0 bumped to ASM 9.10.1, with support for Java 27

Co-authored-by: robin.bygrave <robin.bygrave@eroad.com>
2026-09-22 13:19:42 +12:00
Rob Bygrave 67fc05e4f5 #3888 Tests for @DbArray using nullable false (various options) for List<Integer> (#3889) 2026-09-22 12:55:10 +12:00
Rob Bygrave 4544e6e679 Bump test versions to 18.6.0 after release 2026-09-21 20:03:20 +12:00
Rob Bygrave 2b92e417df Version 18.6.0 18.6.0 2026-09-21 19:52:06 +12:00
Rob Bygraveandrobin.bygrave e4bdec0fda Postgis: Add GraalVM native image reflect-config.json for org.postgis.DriverWrapperLW etc (#3887)
This is handy when compiling to native image with GraalVM and using Postgis and DriverWrapperLW
Adds the PGbox2d, PGbox3d, PGgeography, PGgeographyLW, PGgeometry, PGgeometryLW

Co-authored-by: robin.bygrave <robin.bygrave@eroad.com>
2026-09-19 21:27:59 +12:00
Rob Bygraveandrobin.bygrave 328b13af18 Dto mapper generation support for dbarray (#3886)
* Dto mapper generation support for @DbArray

Currently it is not detected DbArray and instead thinking its a ToMany which is invalid.

* Dto mapper generation support for @DbJson collections

Currently it is not detected and instead thinking its a ToMany which is invalid.

---------

Co-authored-by: robin.bygrave <robin.bygrave@eroad.com>
2026-09-18 18:57:46 +12:00
dependabot[bot] fd8ef48486 Build(deps-dev): Bump org.mariadb.jdbc:mariadb-java-client (#3881)
Bumps [org.mariadb.jdbc:mariadb-java-client](https://github.com/mariadb-corporation/mariadb-connector-j) from 3.0.7 to 3.3.5.
- [Release notes](https://github.com/mariadb-corporation/mariadb-connector-j/releases)
- [Changelog](https://github.com/mariadb-corporation/mariadb-connector-j/blob/main/CHANGELOG.md)
- [Commits](https://github.com/mariadb-corporation/mariadb-connector-j/compare/3.0.7...3.3.5)

---
updated-dependencies:
- dependency-name: org.mariadb.jdbc:mariadb-java-client
  dependency-version: 3.3.5
  dependency-type: direct:development
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2026-09-17 16:11:11 +12:00
Rob Bygraveandrobin.bygrave 69f39f9c82 Publish timed metric max values over rolling 59-second windows (#3880)
* Publish timed metric max values over rolling 59-second windows

* Publish timed metric max values over rolling 59-second windows

Use "now - 2 * WINDOW_NANOS" on initialise and reset to ensure
the next collection publishes.

---------

Co-authored-by: robin.bygrave <robin.bygrave@eroad.com>
2026-09-17 16:10:40 +12:00
Rob Bygraveandrobin.bygrave 2f1625316b Postgis: Add GraalVM native image reflect-config.json for org.postgis.DriverWrapperLW etc (#3885)
This is handy when compiling to native image with GraalVM and using Postgis and DriverWrapperLW

Co-authored-by: robin.bygrave <robin.bygrave@eroad.com>
2026-09-17 16:09:09 +12:00
Rob Bygraveandrobin.bygrave 952d9940e7 #3882 - Fix querybean-generator:19.3.0+ warning: Failed to write EntityClassRegister (#3884)
Fix a regression introduced in 19.3.0 via early creation of EntityClassRegister source file

Co-authored-by: robin.bygrave <robin.bygrave@eroad.com>
2026-09-17 15:57:38 +12:00
robin.bygrave c62b63119b Fix test pom versions to 18.5.0 after release 2026-08-18 15:48:26 +12:00
Rob Bygrave fdcbb91981 Version 18.5.0 18.5.0 2026-08-17 21:57:31 +12:00
Rob Bygrave 0e2b1f95b2 Bump ebean-datasource to 10.12 with cumulative + delta metrics support 2026-08-17 21:54:36 +12:00
robin.bygrave 80f5cab086 Version 18.5.0-RC1 18.5.0-RC1 2026-08-17 13:13:49 +12:00
AntoineDuComptoirDesPharmacies 90aff3d9ef Bugfix/3876 (#3877)
* Add test for #1852 : cascaded delete order broken by a write from a persist callback

A join entity owns the foreign key to the bean its delete cascades to, so the join row
has to be deleted first. When a BeanPersistController writes to the database from
preDelete, that write flushes the batch from inside the flush that is already running :
the outer flush has taken the join rows out of their bean holder, so the inner flush
finds only the assets and executes them first, which fails on the foreign key.

    BatchControl flush [DcoLink:0 d:2, DcoAsset:1 d:2]                  <- outer flush
    BatchControl flush [DcoLink:0 d:0, DcoAsset:1 d:2, DcoAudit:2 i:1]  <- from preDelete

The scenario is fixed as a side effect of a2f954a60 (#3830, released in 18.3.0) which
moved controllerPreDelete() ahead of the cascade. The test pins that down : it fails
with a DataIntegrityException on a2f954a60~1 and passes on master. The graph is fetched
up front on purpose, a lazy load would flush the batch on its own and hide the ordering.

* Add failing test reproducing #1852 : out of order cascaded delete on a self referencing tree

The shape reported on the issue in 2019 : a container cascades the delete down a tree of
TreeBean, and the deletes are not issued deepest first. On 18.4.0 :

    delete from dco_tree where id in (?)      -- the root, whose children are still there
    delete from dco_tree where id in (?,?,?)
    delete from dco_tree where id in (?,?)

Referential integrity constraint violation: FK_DCO_TREE_PARENT_ID.

This is a different defect from the batch reordering fixed by a2f954a60 : nothing is batched
here, the recursion itself walks the tree in the wrong order. Disabled so it does not break
the build, remove the annotation to see the failure.

* FIX: a persist done from a BeanPersistController callback flushes the batch mid-execution

#3148 stopped a query performed from a callback from flushing the batch that is already
executing : BatchControl.executeNow disables flushOnQuery for the duration. A persist done
from the same callback is not covered. It reaches BatchControl.executeOrQueue, which flushes,
and the statements queued behind the one currently executing are issued early.

Saving a parent/child graph in batch while an audit row is written from preInsert issues the
children before their parent has an id :

    insert into dco_link (parent_id, asset_id) values (?,?)
      NULL not allowed for column "PARENT_ID"

Same defect on the delete side, where the join rows are issued after the beans they reference
(#1852, #3185) — that path no longer reproduces since a2f954a60 moved controllerPreDelete()
ahead of the cascade, but only preDelete was moved, so preInsert and preUpdate still run
inside the flush.

Guard executeOrQueue with the same reasoning as the existing flushOnQuery guard : while the
batch is executing, queue rather than flush. The statements added meanwhile are picked up by
the do/while loop in executeAll().

* FIX: same guard on executeStatementOrBatch, a SqlUpdate from a callback also flushes mid-execution

executeStatementOrBatch() flushes on (batchFlushOnMixed && !isBeansEmpty()), and persistedBeans
is only cleared once executeAll() returns, so during the batch execution that condition holds and
a SqlUpdate run from a BeanPersistController callback re-enters the flush the same way a save does.

Reproduced with the same test, the callback running a SqlUpdate instead of a save :

    insert into dco_link (parent_id, asset_id) values (?,?)
      NULL not allowed for column "PARENT_ID"

The second flush of that method, on pstmtHolder.maxSize() >= batchSize, is left untouched : it can
only trigger when the pstmt holder fills up mid-execution and there is no test covering it.
2026-08-17 13:02:25 +12:00
dev_Hakazeandarimu1 1c857e47b4 #3407 Honor isolation level on read-only transactions (#3874)
Read-only TxScope previously ignored isolation when creating
ImplicitReadOnlyTransaction. Apply setIsolationLevel after
createReadOnlyTransaction so @Transactional(readOnly=true, isolation=...)
and TxScope setReadOnly+setIsolation take effect.

Co-authored-by: arimu1 <19286898+arimu1@users.noreply.github.com>
2026-08-14 18:39:12 +12:00
Rob Bygraveandrobin.bygrave cc9e67c326 Add dbName() to MetaQueryPlan - easier to support multi-db query plan capture handling (#3879)
Co-authored-by: robin.bygrave <robin.bygrave@eroad.com>
2026-08-14 18:32:53 +12:00
Rob Bygraveandrobin.bygrave 7a7dfb96d7 Metrics - support both CUMULATIVE and DELTA metrics collection concur… (#3878)
* Metrics - support both CUMULATIVE and DELTA metrics collection concurrently

ebean insight [and StatsD] work off DELTA metrics, where as OTEL
and Prometheus want CUMULATIVE. With this change we can have a metrics
collection for ebean insight using DELTA mode and have a second collection
use CUMULATIVE for reporting to OTEL - for the case of fan-out metrics
going to 2 places.

This isn't strictly needed when only one collection mode is used.

* Metrics - Add Mode with RESET, DELTA and CUMULATIVE

Previously we were overloading RESET and DELTA but we really need
these to be 2 separate modes for the existing tests and the
get(reset) api

* Fix test TestNatKeyCacheWithForeignKey with cache stats reset

---------

Co-authored-by: robin.bygrave <robin.bygrave@eroad.com>
2026-08-14 18:32:23 +12:00
robin.bygrave 3c4e87f3f7 Docs: Update docs on OneToOne mapping with mappedBy 2026-08-06 21:53:14 +12:00
Rob Bygrave f5eee70ec4 Bump test modules to 18.4.0 2026-07-28 22:35:46 +12:00
Rob Bygrave 46a73f6250 Version 18.4.0 18.4.0 2026-07-28 22:29:48 +12:00
Rob Bygrave 4a46cc0706 Tests: use redis 8.6.2 explicitly in tests 2026-07-28 22:26:49 +12:00
Rob Bygrave 94630b7e1e Tests: Rename ebean-reddison test entities 2026-07-28 21:42:48 +12:00
robin.bygrave aac85eec89 Tests: Move redisson tests to use database 1 / isolate from ebean-redis tests 2026-07-28 21:23:41 +12:00
robin.bygrave a8ec4ee437 Tests: Improve flakey test TestHistoryOneToOne 2026-07-28 21:18:56 +12:00
Rob Bygrave 12b9d0eaae Bump ebean-migration to 14.4.0 - adds rebaseMigrationHistory feature (#3873) 2026-07-28 21:09:27 +12:00
Rob Bygraveandrobin.bygrave eeb32514be DB2 exists - use existsWithCaseWhen true, similar to #3849 (#3872)
* DB2 exists - use existsWithCaseWhen true, similar to #3849

Fixes exists() query regression with DB2 by using the platform flag existsWithCaseWhen = true;

* DB2 using existsFromClause = " from sysibm.sysdummy1";

---------

Co-authored-by: robin.bygrave <robin.bygrave@eroad.com>
2026-07-28 20:18:34 +12:00
robin.bygrave 02936735c1 Tests: Disable query plan capture tests for DB2 2026-07-28 19:40:14 +12:00
dependabot[bot] 57713a9686 Build(deps): Bump org.postgresql:postgresql in /ebean-core-type (#3870)
Bumps [org.postgresql:postgresql](https://github.com/pgjdbc/pgjdbc) from 42.7.11 to 42.7.12.
- [Release notes](https://github.com/pgjdbc/pgjdbc/releases)
- [Changelog](https://github.com/pgjdbc/pgjdbc/blob/master/CHANGELOG.md)
- [Commits](https://github.com/pgjdbc/pgjdbc/compare/REL42.7.11...REL42.7.12)

---
updated-dependencies:
- dependency-name: org.postgresql:postgresql
  dependency-version: 42.7.12
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2026-07-24 10:01:59 +12:00
dependabot[bot] 4076b0fcbd Build(deps): Bump org.postgresql:postgresql in /ebean-postgis-types (#3869)
Bumps [org.postgresql:postgresql](https://github.com/pgjdbc/pgjdbc) from 42.7.11 to 42.7.12.
- [Release notes](https://github.com/pgjdbc/pgjdbc/releases)
- [Changelog](https://github.com/pgjdbc/pgjdbc/blob/master/CHANGELOG.md)
- [Commits](https://github.com/pgjdbc/pgjdbc/compare/REL42.7.11...REL42.7.12)

---
updated-dependencies:
- dependency-name: org.postgresql:postgresql
  dependency-version: 42.7.12
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2026-07-24 10:01:34 +12:00
Rob Bygraveandrobin.bygrave 49f6bef2fb Add ebean-avajejsonb-mapper module - Mapping DbJson content using avaje jsonb library (no reflection, graalvm support) (#3871)
* Add ebean-avajejsonb-mapper module - Mapping DbJson content using avaje jsonb library (no reflection, graalvm support)

* Fix flakey test TestInheritance

---------

Co-authored-by: robin.bygrave <robin.bygrave@eroad.com>
2026-07-24 10:01:03 +12:00
Rob Bygraveandrobin.bygrave d6ba4967b6 ORM Update - add usingTransaction() to support using explicit transaction (#3868)
Co-authored-by: robin.bygrave <robin.bygrave@eroad.com>
2026-07-22 09:45:54 +12:00
Rob Bygraveandrobin.bygrave 0d0ec79f1e SqlUpdate - add usingTransaction() to support using explicit transaction (#3867)
Co-authored-by: robin.bygrave <robin.bygrave@eroad.com>
2026-07-21 09:59:23 +12:00
Rob Bygraveandrobin.bygrave 1737ae13db Modify SqlQuery.TypedQuery to implement FindableQuery (common interface) (#3866)
Add usingConnection() and canel() to support common FindableQuery interface

Co-authored-by: robin.bygrave <robin.bygrave@eroad.com>
2026-07-20 23:27:51 +12:00
Rob Bygraveandrobin.bygrave 17b641b163 MappedQuery - add findEach() findEachWhile() to MappedQuery (and promote to StreamableQuery) (#3865)
* MappedQuery - add findEach() findEachWhile() to MappedQuery (and promote to StreamableQuery)

* MappedQuery - add findEach() findEachWhile() to MappedQuery (and promote to StreamableQuery)

---------

Co-authored-by: robin.bygrave <robin.bygrave@eroad.com>
2026-07-20 23:12:37 +12:00
Rob Bygraveandrobin.bygrave 4f6168dfed Add FinableQuery, StreamableQuery common interfaces for Query, DtoQuery, MappedQuery, SqlQuery (#3864)
* Add FinableQuery, StreamableQuery common interfaces for Query, DtoQuery, MappedQuery, SqlQuery

* QueryBean.cancel() added to support the new common FindableQuery interface

---------

Co-authored-by: robin.bygrave <robin.bygrave@eroad.com>
2026-07-20 22:44:42 +12:00
robin.bygrave a03a098e1b Tests: fix tests for Postgres any syntax 2026-07-20 22:06:30 +12:00
Rob Bygrave 78f17fcd46 Merge pull request #3863 from ebean-orm/feature/mapped-query-cancellable
Change MappedQuery to extend CancelableQuery - make it cancelable
2026-07-20 22:04:15 +12:00
Rob Bygrave 6895a4c057 Merge pull request #3862 from ebean-orm/dependabot/maven/ebean-spring-txn/com.fasterxml.jackson.core-jackson-databind-2.22.1
Build(deps-dev): Bump com.fasterxml.jackson.core:jackson-databind from 2.22.0 to 2.22.1 in /ebean-spring-txn
2026-07-20 21:59:24 +12:00
robin.bygrave 2362c0816a Change MappedQuery to extend CancelableQuery - make it cancelable 2026-07-20 21:57:22 +12:00
robin.bygrave 37567e8fe8 Change MappedQuery to extend CancelableQuery - make it cancelable 2026-07-20 21:50:59 +12:00
robin.bygrave ce8dc36cf7 Actual version 18.3.0 deployed to central 18.3.0 2026-07-17 10:20:02 +12:00
dependabot[bot] 05f5291359 Build(deps-dev): Bump com.fasterxml.jackson.core:jackson-databind
Bumps [com.fasterxml.jackson.core:jackson-databind](https://github.com/FasterXML/jackson) from 2.22.0 to 2.22.1.
- [Commits](https://github.com/FasterXML/jackson/commits)

---
updated-dependencies:
- dependency-name: com.fasterxml.jackson.core:jackson-databind
  dependency-version: 2.22.1
  dependency-type: direct:development
...

Signed-off-by: dependabot[bot] <support@github.com>
2026-07-16 22:10:37 +00:00
Rob Bygrave 1173962398 Merge pull request #3861 from ebean-orm/feture/dto-more
dto mapping: add DtoConverters
2026-07-17 10:09:49 +12:00
robin.bygrave 56f86e0263 dto mapping: add DtoConverters 2026-07-17 10:01:54 +12:00
Rob Bygrave 8751a1a04d Merge pull request #3860 from ebean-orm/feature/insert-on-conflict-pk-fallback
With InsertOnConflict fallback to PK constraint when no Unique constr…
2026-07-17 00:04:00 +12:00
robin.bygrave 14e6e3f824 With InsertOnConflict fallback to PK constraint when no Unique constraint and id value provided
This is for the case where the primary key is a supplied value (like a string, iso code, serial
number, bar code etc)
2026-07-16 23:51:29 +12:00
Rob Bygrave a9d37b83d7 Merge pull request #3859 from ebean-orm/feature/findOneOrThrow
enh: Add findOneOrThrow() with decent derived message for EntityNotFo…
2026-07-16 23:28:12 +12:00