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
Roland Praml
dede93ca62
Use char-append instead of String-append
2023-08-21 08:22:18 +02:00
Rob Bygrave
fbcd4c3133
Add filterManyRaw() and Deprecate filterMany( <string expressions> )
...
The filterMany( <string expressions> ) uses the language parser which
ultimately will we probably remove in ebean 15.x
Code can migrate to filterManyRaw() instead or better yet change to
use the improved query beans filterMany( <closure> ) option that will
be included in this same ebean release.
2023-08-21 11:15:39 +12:00
Rob Bygrave
8a4024ecfc
FIX for filterMany with raw expression with single SQL query
...
Fix for the case where the filterMany is not executed on a separate
query but instead part of the origin query.
The fix is to use the appropriate DeployParser and also fix the path
alias like ${} -> ${contacts}
2023-08-19 13:54:38 +12:00
Rob Bygrave
9756c9133e
Improve existing test for filterMany using raw with separate SQL query for filterMany
2023-08-19 13:46:45 +12:00
Rob Bygrave
0e9fe6a096
Remove extra space added to the generated SQL via the LIKE expression
2023-08-19 09:29:19 +12:00
Rob Bygrave and GitHub
9331050a43
Merge pull request #3166 from ebean-orm/feature/InTuples-Literal-skipCache
...
InTuples literal mode - don't cache ebean compiled query plan
2023-08-17 15:34:17 +12:00
robin.bygrave
9bcd189730
Test TestInTuplesWithLocalDate does not support SQLServer and DB2 yet
2023-08-17 15:24:28 +12:00
Rob Bygrave and GitHub
428365ceb9
Merge pull request #3164 from FOCONIS/bugfix/drop_foreign_key_without_index
...
BUG: Include drop for foreign keys without index when dropping table
2023-08-17 15:12:19 +12:00
robin.bygrave
76c889c6d9
InTuples literal mode - don't cache ebean compiled query plan
...
- Don't cache ebean compiled query plan when InTuples goes into literal mode
- Postgres maxInBinding = 32_000;
- SQLite maxInBinding = 800;
- Note that not caching the compiled query plan means that metrics visitor isn't
going to see it, we lose collection of that query execution metric. We might
need a plan to fix this later.
2023-08-17 15:08:16 +12:00
Rob Bygrave
9d7754b92d
Add support for literal mode for InTuples with lots of entries
...
So as to not exceed the limit on bind values, the InTuples expression can
go into literal mode where it uses literal values for supported types -
Numbers, Strings, UUID, and LocalDate.
2023-08-17 00:33:56 +12:00