Rob Bygrave
c48e5428c5
#3265 Fix for Update Query logging to trim large values in bind log
2023-11-21 22:32:35 +13:00
Rob Bygrave
0da3772ae9
#3270 Fix for use with BeanFindController and attribute queries
...
The existence of a BeanFindController should not break the use of
single attribute queries + still allow auto-tuning.
2023-11-21 22:04:47 +13:00
Rob Bygrave
496ef36b11
Merge branch 'findsingleattribute-beanfindcontroller' of github.com:FOCONIS/ebean into FOCONIS-findsingleattribute-beanfindcontroller
2023-11-21 21:40:09 +13:00
Rob Bygrave
803f1d8642
Refactor tidy internals of DbPrimary, DatabaseFactory, ContainerConfig, ClusterManager
2023-11-20 22:18:53 +13:00
Noemi Praml
7afd37cd98
Failing Tests with CustomerFindController
2023-11-14 17:05:42 +01:00
Rob Bygrave
24bb364d40
Add read only database configuration/builder option
...
When using DatabaseBuilder.readOnlyDatabase(true) then
ebean will:
- Set the DataSourceBuilder to use autoCommit=true and readOnly=true
- Use the same DataSource instance for both dataSource and readOnlyDataSource
This is to simplify the setup/configuration for creating a Database that
will only have read-only use.
Note that readOnly=true is a JDBC hint and for example H2 database effectively
ignores that hint where as Postgres will enforce the read-only true nature.
2023-11-13 23:12:05 +13:00
Rob Bygrave
624e92840c
Adjust "for testing purposes" log messages
2023-11-06 12:55:22 +13:00
Rob Bygrave
1f9cf1e4b7
Split DatabaseBuilder interface separating the setters n getters adding DatabaseBuilder.Settings
...
So DatabaseBuilder.Settings has all the getters for code looking to read
the configuration that has been set. So DatabaseBuilder now just has the
setter methods.
Use DatabaseBuilder.settings() to access the settings and read the config
that has been set.
2023-11-03 22:58:11 +13:00
Rob Bygrave
12029ed06e
Refactor extract interface DatabaseBuilder from DatabaseConfig
...
First step in supporting the builder pattern for creating Database
2023-11-03 21:17:55 +13:00
Rob Bygrave
41185eeb5c
Bump ebean-datasource to 8.8 with DataSourceBuilder
...
First step in migrating the ebean-datasource API to use builder pattern.
DataSourceConfig (concrete type) migrating to DataSourceBuilder (interface).
A followup step will deprecate the use of DataSourceConfig.
2023-11-03 18:31:11 +13:00
Rob Bygrave
da76b422c8
Fix test with sql logging including executeBatch() for sqlserver
2023-10-10 22:26:25 +13:00
Rob Bygrave
a1a3b33fc6
Fix test with sql logging including executeBatch() for sqlserver
2023-10-10 21:47:14 +13:00
Rob Bygrave and GitHub
7ecd7877d5
Merge pull request #3240 from ebean-orm/feature/OneToOne-softDelete-join
...
OneToOne with SoftDelete join missing deleted predicate
2023-10-10 21:38:50 +13:00
Rob Bygrave
e5f64f4211
Fix test with sql logging including executeBatch()
2023-10-10 21:38:17 +13:00
Rob Bygrave
90a6b71b7e
#3240 followup no functional change, tidy use of ctx.joinAdded()
2023-10-10 21:33:23 +13:00
Rob Bygrave
80fc0723c8
Failing test for OneToOne with SoftDelete join missing deleted predicate
2023-10-10 21:24:35 +13:00
Rob Bygrave
b80c67286b
Change SQL log to include executeBatch() via BatchedPstmt
...
Adjustments to tests to support this
2023-10-10 01:02:11 +13:00
Rob Bygrave
0bead4135e
Change SQL log to include executeBatch() via BatchedPstmt
...
Adjustments to tests to support this
2023-10-10 00:59:25 +13:00
Rob Bygrave
dc7b73fc25
Follow up #3223 - modify test, could use @Column(insertable = false, updatable = false) instead of @Formula
2023-09-19 23:03:30 +12:00
Rob Bygrave
d5048db2c6
Follow up #3223 - Add @IdClass example test
2023-09-19 23:02:31 +12:00
Rob Bygrave
0b0b7cbc67
Follow up #3223 - tidy test only
...
Make Embedded Id bean more immutable via final fields and constructor
2023-09-19 22:47:23 +12:00
Roland Praml
004f4deae3
Regression of #3133 with formula properties
2023-09-18 14:59:17 +02:00
Rob Bygrave
ff43672f4e
Move source to Jakarta (use ./jakarta-to-javax.sh)
...
Moving the master branch to use jakarta based code and
dependencies. Change to use ./jakarta-to-javax.sh to convert
back to javax when releasing that.
2023-09-11 23:31:01 +12:00
Rob Bygrave
400e840c22
Fix test for MariaDB which does not support delete with subquery with limit
...
like:
delete from bbookmark_user where id in (select t0.id from bbookmark_user t0 where t0.name = ? limit 10)
2023-09-11 23:05:55 +12:00
Rob Bygrave
bd0cad723d
Add test for Map @OneToMany without orphanRemoval
...
Without orphanRemoval then map.clear() does not invoke any lazy loading.
2023-08-29 22:16:37 +12:00
Rob Bygrave
b6b8f77213
Map.clear() on a @OneToMany orphanRemoval=true invokes 1+N queries due to MapKey
...
The fix is for LoadManyRequest to detect when a MapKey is on the collection
and include that in the lazy loading query (to avoid the N queries invoked)
2023-08-29 22:08:56 +12:00
Rob Bygrave
770eb06cab
Add test for lazy loading @OneToMany using Map
2023-08-29 22:03:58 +12:00
Rob Bygrave
5377454476
Follow up #3173 - Change BeanSet clear() to lazy load ALL properties
...
To avoid the 1+N lazy loading queries that are invoked due to the clear()
when the entity bean in the Set has a hashCode/equals implementation
2023-08-29 21:20:19 +12:00
Rob Bygrave
4b9d4d0a90
Follow up #3173 - Add test for BeanSet clear() when hashCode/equals used
...
This shows the extra lazy loading that is occurring when clear() is
called on the [Bean]Set DUE to the hashcode/equals implementation that
is present on the entity bean that is in the Set.
2023-08-29 21:13:19 +12:00
Rob Bygrave
90fc4466bf
Follow up #3173 - Add test for BeanSet lazy loading OneToMany with hashCode/equals
2023-08-29 18:43:16 +12:00
Rob Bygrave
359a55d7a5
#3173 - BeanSet lazy loading / Too many DataSource connections used
...
- The error reported was that a DataSource connection pool maxed out
- The symptom was that there was an additional lazy loading queries invoked via the hashCode/equals implementation of ManyToMany Set.
- The fix is for BeanSet init() to lazy load with onlyIds = false, that avoids the extra lazy loading query from being executed
2023-08-29 18:28:09 +12:00
Rob Bygrave
60e0c552ab
Fix test for MySql, which does not support delete statement with limit clause
2023-08-26 00:17:57 +12:00
Rob Bygrave
128bd171f5
Refactor SpiEbeanServer for SpiSqlQuery with transaction (vs passing transaction)
2023-08-25 23:51:09 +12:00
Rob Bygrave
0ab0f9c569
Refactor internal SpiEbeanServer API - transaction from SpiQuery
...
Originally the API took explicit transactions but then the API changed
toward query.usingTransaction(), which means the SpiQuery holds the
explicit transaction.
This change is to update the SpiEbeanServer API to reflect that it can get
explicit transaction from SpiQuery.transaction() rather than pass transaction
around.
Doing this also identified a small bug where L2 cache could be hit when it should
not after there is some update on the transaction (hence the adjustment to the
test TestBeanCache missCount)
2023-08-25 23:15:51 +12:00
Rob Bygrave
7e60c66759
Follow up for #3188 Add tests for futures when creating new transaction
2023-08-25 21:05:14 +12:00
Rob Bygrave
4f18dc339f
Follow up for #3188 Fix findFutureList() and findFutureIds() when txn in scope
...
Apply the same fix to findFutureList() and findFutureIds()
2023-08-25 20:56:55 +12:00
Rob Bygrave
60a2626f61
#3188 Fix findFutureCount() when there is a current transaction in scope
2023-08-25 20:32:48 +12:00
Rob Bygrave
2e980b06f6
Refactor SpiEbeanServer to use SpiQuery
2023-08-25 17:53:23 +12:00
Rob Bygrave
3ebfd2e9e6
Update test only - TestDeleteCascadingOneToMany
2023-08-24 21:01:11 +12:00
Rob Bygrave
96904d525f
Update test only - TestDeleteCascadeById
2023-08-24 20:54:43 +12:00
Rob Bygrave
f4ca4ec476
#3183 - Fix for: Wrong limit using setMaxRows on delete between calls
...
Reproduces when the delete needs to perform a select due to caching or
cascading of the delete
2023-08-24 20:35:11 +12:00
Rob Bygrave
327995526e
Fix tests for Postgres
2023-08-24 20:17:41 +12:00
Rob Bygrave
6cab2498dc
Merge branch 'experimental-elliminate-not-in-with-too-many-params' of github.com:FOCONIS/ebean into FOCONIS-experimental-elliminate-not-in-with-too-many-params
2023-08-22 23:22:11 +12:00
Rob Bygrave and GitHub
dbe81bdb6e
Merge pull request #3180 from FOCONIS/bugfix/setId-or-idEq-in-subquery
...
BUG: Using a subquery with idEq or setId is missing the bind value
2023-08-22 22:35:31 +12:00
Jonas Pöhler
2e2b3844fe
Tidy test
2023-08-22 11:36:44 +02:00
Jonas Pöhler
90614adb2b
ADD: Testcase to show missing bind values when using idEq or setId in subquery
2023-08-22 11:04:24 +02:00
Roland Praml
77aeda1753
draft: elliminate the "not in" query that may 'explode' on SqlServer
2023-08-21 17:10:23 +02:00
Roland Praml
2a24ec3d49
Added some tests
2023-08-21 16:51:19 +02:00
Roland Praml
d9d09b31b4
Refactored delete-by-id
2023-08-21 15:36:05 +02:00
Rob Bygrave
56550a9534
#3166 Remove InTuples literal mode
2023-08-21 23:16:55 +12:00