Rob Bygrave
4bcfa80df2
Merge pull request #3594 from ebean-orm/feature/improved-readOnly-immutable-DisabledLazyLoad
...
Modify disableLazyLoad to throw LazyInitialisationException instead o…
2025-04-29 23:32:46 +12:00
Rob Bygrave
c583879d57
Modify disableLazyLoad to throw LazyInitialisationException instead of returning null
...
Modify such that accessing an unloaded property throws a LazyInitialisationException. This includes ToMany collections that where previously initialised as empty collections (that didn't lazy load).
This change brings the disableLazyLoad behaviour in line with the unmodifiable behaviour.
It does mean that the use case of bulk mapping from entities to DTOs via something like MapStruct will no longer work nicely (mapping nulls and empty lists versus LazyInitialisationException).
2025-03-18 23:46:42 +13:00
Rob Bygrave
6d791c7b50
Add BeanAccessException extends UnsupportedOperationException
...
And:
LazyInitialisationException extends BeanAccessException ...
UnmodifiableEntityException extends BeanAccessException ...
2025-03-18 22:54:34 +13:00
Rob Bygrave
1afe42f4c6
Merge branch 'master' into feature/improved-readOnly-immutable
2025-03-18 22:43:00 +13:00
Rob Bygrave
4e7f3c13a0
Merge pull request #3592 from ebean-orm/feature/improved-readOnly-immutable-part2
...
Remove readOnly, migrate to unmodifiable (or use normal mutable)
2025-03-18 22:41:12 +13:00
Rob Bygrave
d7366dec0f
Tidy readOnly removal
2025-03-18 20:59:04 +13:00
Rob Bygrave
ceee1d7489
Remove readOnly from Query
2025-03-18 20:49:26 +13:00
Rob Bygrave
1b23319fa4
Remove readOnly from EntityBeanIntercept and BeanCollection
2025-03-18 20:32:22 +13:00
Rob Bygrave
6f726973ea
Remove most internal use of readOnly
2025-03-18 19:53:13 +13:00
Rob Bygrave
82284b19d5
Bean cache sharable instances as unmodifiable + bean cache queries can also be unmodifiable
...
Entities without *any* relationships can support "sharable instances" with bean caching. This change restores that and uses unmodifiable instances (rather than the old ReadOnly).
Currently, for a query to get shared instances it now needs to explicitly use setUnmodifiable(true) where as before it defaulted to shared instances so that is a behaviour change.
Additionally, bean cache queries were not honouring setUnmodifiable(true) and with these changes they now do.
2025-03-16 23:19:54 +13:00
Rob Bygrave
798d01abd1
LazyInitialisationException, plus javadoc
2025-03-16 21:12:25 +13:00
Rob Bygrave
5136a5a708
Support unmodifiable Embedded and EmbeddedId
2025-03-13 22:52:45 +13:00
Rob Bygrave
fa25d7cc8a
Using Query Cache now implies unmodifiable
...
- Query Cache now holds unmodifiable collections
- Can no longer have readOnly=false with queryCache=true
- Reference beans now also honor unmodifiable
- Effectively no longer does bean cache lookup for reference beans (which it defaulted to when cacheSharableBeans true, e.g. Country entity bean)
2025-03-11 23:50:34 +13:00
Rob Bygrave
c13e09257c
Version 14.10.0
14.10.0
2025-03-11 21:26:00 +13:00
Rob Bygrave
ed65433640
Merge pull request #3574 from ebean-orm/feature/3459-postgres-varchar
...
#3459 Postgres varchar default to no length (aka text)
2025-03-11 20:01:26 +13:00
Rob Bygrave
08890e9d5a
Merge pull request #3590 from ebean-orm/feature/3580-lookwriter-logWarn
...
Adjust LookupWriter to log at WARN rather than ERROR due to Quarkus dev mode
2025-03-10 23:56:19 +13:00
Rob Bygrave
4273c4af6a
Adjust LookupWriter to log at WARN rather than ERROR due to Quarkus dev mode
...
Die to Quarkus dev mode (#3541 #3582 ) we want to log FilerException at WARN level rather than ERROR. This is because Quarkus dev mode will invoke the annotation processor more than usual, so we expect to fail with the FilerException.
2025-03-10 23:42:38 +13:00
Rob Bygrave
51424d9eea
Merge pull request #3580 from SentryMan/feature/lookup-generation
...
[querybean-generator] Generate lookup for modules
2025-03-10 23:31:35 +13:00
Rob Bygrave
cf2ab33903
Merge pull request #3589 from ebean-orm/feature/bump-ebean-agent-dependency
...
Bump ebean-agent to 14.10.0
2025-03-10 23:28:05 +13:00
Rob Bygrave
90d8b4fb04
Bump ebean-agent to 14.10.0
2025-03-10 23:27:02 +13:00
Rob Bygrave
ff4eeff264
Merge pull request #3588 from ebean-orm/feature/3586-querybean-gen
...
[query bean generation] #3586 public constructor for Embedded bean
2025-03-10 08:02:03 +13:00
Rob Bygrave
64ba343e35
[query bean generation] #3586 public constructor for Embedded bean
2025-03-10 07:59:33 +13:00
Rob Bygrave
af3c59c0fd
Merge pull request #3587 from ebean-orm/feature/bump-test-containers-77
...
Bump ebean-test-containers dependency - improved SQL Server handling
2025-03-10 07:40:31 +13:00
Rob Bygrave
ae55d28026
Bump ebean-test-containers dependency - improved SQL Server handling
...
Improvments around collation changes that end up making SQL Server startup flaky
2025-03-10 07:40:02 +13:00
Rob Bygrave
ddffc8eee2
Merge pull request #3581 from apflieger/#3573-initfields-prevent-secondary-query
...
OneToMany initialisation via List.of() - was Tests only - new test on multiple many joins
2025-03-10 07:30:40 +13:00
Rob Bygrave
7f1a3a46cf
#3581 ebean-agent 14.10.0 handling for OneToMany initialisation
2025-03-10 07:12:20 +13:00
Rob Bygrave
a59f75a468
Merge pull request #3585 from nedge/feature/Create_test_entities
...
Simple Test Entities in preparation for type scoped loading
2025-03-05 08:06:39 +13:00
Eddie Mc Greal
6f1c66ecd6
Simple Test Entities in preparation for type scoped loading
2025-03-04 14:17:08 +01:00
Rob Bygrave
25f6fb6d6f
test only - Almost fix the model for test_manyNonRoot_RootHasNoMany
...
The test was using field access??? when that isn't valid unless we specifically turn on enhancement to support that.
Using proper method access though stops the test from failing.
2025-03-03 21:42:15 +13:00
Rob Bygrave
852def8536
test only - use assertThat hasSize instead of assertEquals for test_manyNonRoot_RootHasNoMany
2025-03-03 21:34:22 +13:00
Rob Bygrave
dfb29fd75f
Merge pull request #3578 from mkurz/fix_3577
...
Work around `mysqldump` bug by moving comment one line up
2025-03-03 21:26:40 +13:00
Rob Bygrave
80c3501197
Merge pull request #3583 from ebean-orm/feature/revert-3541-3582
...
[querybean-generator] #3582 - Revert #3541 "FilerException trying to write EntityClassRegister with Quarkus dev mode / hot reload "
2025-03-03 21:25:39 +13:00
Rob Bygrave
b4ff5748fc
Merge pull request #3579 from FOCONIS/rollbac-or-commit-before-close
...
Rollback/Commit raw connections before close
2025-03-03 21:25:12 +13:00
Rob Bygrave
64f01f0543
[querybean-generator] #3582 - Revert #3541 "FilerException trying to write EntityClassRegister with Quarkus dev mode / hot reload "
...
This reverts commit 69c25309 and applies the required "Fix" in the initModuleInfoBean() method to catch FilerException and log it at WARN level
2025-03-03 20:49:19 +13:00
Arnaud Pflieger
fee6e0f480
Tests only - new test on multiple many joins
...
This test reproduce the problem of #3573
The field initialization `= List.of();` prevents eager secondary query.
2025-02-28 12:20:18 +01:00
Josiah Noel
50b44c4529
Update LookupWriter.java
2025-02-28 00:29:03 -05:00
Josiah Noel
f0c2ba0e28
[Feature] Generate lookup for modules
...
Generate Lookup Class for modular projects
2025-02-27 20:47:16 -05:00
Roland Praml
7643dc9b22
Rollback/Commit raw transactions before close
2025-02-27 10:56:41 +01:00
Matthias Kurz
c49a1b3d71
Work around mysqldump bug by moving comment one line up
...
It seems like mysqldump just adds ;; to the last line and does not
check if that line is a comment. To work around that it's good enough
to move the comment one line up - as long as the END does not end with ;
(which here it does not so that is ok)
2025-02-26 15:36:20 +01:00
Rob Bygrave
11e783938c
Merge pull request #3576 from ebean-orm/feature/bump-ebean-test-containers
...
#3511 bump ebean-test-containers dependency
2025-02-26 23:18:43 +13:00
Rob Bygrave
3845861e24
test only - Fix tests due to automatic inline comment included in generated sql like:
...
select /* TestQueryDefaultBatchSize.test_findEach_details__lazy */ t0.order_id, t0.id,
select /* TestQueryDefaultBatchSize.test_findEach_details__lazy */ t0.order_id
2025-02-26 23:15:51 +13:00
Rob Bygrave
d04181865c
test only - update TestOrderByWithMany which is flaky
2025-02-26 23:10:55 +13:00
Rob Bygrave
00d7db31d6
test only - update TestQueryFindIterate which is flaky
2025-02-26 23:07:53 +13:00
Rob Bygrave
6880b5673a
#3511 bump ebean-test-containers dependency
...
ebean-test-containers version 7.6 supports extraDb for MySql and MariaDb, resolving #3511 with extraDb configuration for each extra schema/database required with MySql or MariaDb.
2025-02-26 22:24:05 +13:00
Rob Bygrave
e18b59a9dd
Remove deprecated ExtendedServer.setClock() migrate to DatabaseBuilder.clock() ( #3566 )
...
So we can no longer dynamically change the Clock being used and instead for testing purposes need to create the Database with a test clock instance as needed.
Refer to the ExtendedServerTest for an example
2025-02-26 22:16:12 +13:00
Rob Bygrave
cc48dced09
#3572 DDL support for non-nullable JoinColumn column ( #3575 )
2025-02-26 21:13:50 +13:00
Rob Bygrave
b13bdc95be
#3459 Postgres varchar default to no length (aka text)
...
Change Postgres platform to default a String to varchar [with no length defined] rather than varchar(255)
2025-02-26 18:53:08 +13:00
Rob Bygrave
0a5c3ced21
Test only - update TestQueryMultiManyOrder sql asserts
...
No effective change.
2025-02-26 00:59:57 +13:00
Rob Bygrave
8ff5f7f72a
Recursive freeze on entity beans
...
Noting that the freeze needs to occur after secondary queries have executed
2025-02-26 00:00:07 +13:00
Rob Bygrave
71944bb8fa
Rename flags -> loaded, add message with property name to UnmodifiableEntityException
2025-02-23 22:25:46 +13:00