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
robin.bygrave
9bcd189730
Test TestInTuplesWithLocalDate does not support SQLServer and DB2 yet
2023-08-17 15:24:28 +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
Rob Bygrave
ec0c00eb72
Add Query alsoIf() to conditionally apply changes to a query
2023-08-15 21:56:50 +12:00
Rob Bygrave
1598b40c36
Followup for #3133 - "Embedded id expansion on parentIds" for SQLServer and DB2
2023-08-14 23:00:41 +12:00
Rob Bygrave and GitHub
b8e164e04c
Merge pull request #3148 from FOCONIS/fix-recursive-batch-flush
...
FIX: Recursive batch flush can save beans in wrong order
2023-08-14 13:55:50 +12:00
Rob Bygrave and GitHub
9097466a7b
Merge pull request #3145 from FOCONIS/m2m-where-formula
...
FIX: Query on formula m2o-property uses wrong alias:
2023-08-14 13:55:21 +12:00
Rob Bygrave and GitHub
99604d8ec3
Merge pull request #3155 from ebean-orm/feature/3133-IdClass-match-on-name
...
#3133 - For IdClass match on property name
2023-08-14 13:53:58 +12:00
Rob Bygrave
95d37fc3dc
Temporary ignore test TestCompositeForeignKey for DB2 and SQLServer
2023-08-14 13:41:34 +12:00
Rob Bygrave
76d85adc98
Fix tests for #3133 MySql and SQLServer which require column ordering of PK and FK to match
2023-08-14 11:14:43 +12:00
Rob Bygrave
2f233db465
#3133 - For IdClass match on property name
2023-08-10 23:22:57 +12:00
Rob Bygrave
1ca73ca6aa
Test only - Update test IdClass CEPProductCategoryId to match expectations
2023-08-10 23:17:47 +12:00
Rob Bygrave
b5ac31838c
#3134 Fix for - String cannot be cast to class io.ebean.bean.EntityBean" when deleting entities that use cascade = [CascadeType.ALL] with composite keys
2023-08-10 21:11:58 +12:00
Rob Bygrave
e3e9412eea
#3134 Failing test - String cannot be cast to class io.ebean.bean.EntityBean" when deleting entities that use cascade = [CascadeType.ALL] with composite keys
2023-08-10 20:50:40 +12:00
Roland Praml and Roland Praml
d3427876b7
FIX: Recursive batch flush can save dependant beans in wrong order
2023-08-08 16:59:46 +02:00
Roland Praml
5720ee65b3
Ignored Postgres Platform
2023-08-08 14:02:49 +02:00
Roland Praml
7f441ce72e
FIX: M2M Where Formula joins
2023-08-08 14:02:34 +02:00
Rob Bygrave and GitHub
bb02d74005
Merge pull request #3125 from ebean-orm/feature/query-usingMaster
...
Add query.usingMaster() to explicitly choose master data source
2023-07-03 22:48:47 +12:00
Rob Bygrave
79ed0a5f8e
#3126 - Incorrect complex indexes generation
2023-07-03 22:19:38 +12:00
Rob Bygrave
c4af1d9b23
Add query.usingMaster() to explicitly choose master data source
...
When we have a read replica with potential for replication lag, and config a read only DataSource to use that read replica, by default a query executed without a current transaction will use the read replica.
We specify usingMaster() when we explicitly want to execute a query and use the master data source.
2023-07-03 16:41:22 +12:00
Rob Bygrave
8209d9e229
Add SpiInTuples to hide more details from InTuples
2023-07-03 12:41:31 +12:00
Rob Bygrave
664120f369
Add InTuples expression for multi-column IN expression
2023-07-03 11:54:38 +12:00
Rob Bygrave
e952b555e0
Add InTuples expression for multi-column IN expression
2023-07-03 11:49:53 +12:00
Rob Bygrave and GitHub
9fc1bec6a9
Merge pull request #3046 from FOCONIS/bugfix/lazy_loading_findEach_garbage_collection
...
Bugfix for NPE when lazyLoading in findEach due to Garbage Collection
2023-06-17 11:56:25 +12:00
Jonas Pöhler
09f616aae8
ADD: testcase for showing an issue with deleting and re-adding many-to-many elements (size > 20)
...
(cherry picked from commit e6a4bc4e0c31bb35ab5a13c958c7c4b1f68ca037)
2023-06-16 16:16:53 +02:00
robin.bygrave
c7f6c508a6
#3101 - Support JPA Indexes
2023-06-16 13:44:03 +12:00
Rob Bygrave
2929483b0d
Refactor ebean-core internal API - getters -> accessors
2023-06-01 22:05:53 +12:00
Rob Bygrave
430926c5a9
Remove deprecated Query setLoadBeanCache() - migrate to setBeanCacheMode()
...
Typically migrate to `.setBeanCacheMode(CacheMode.PUT)` or `.setBeanCacheMode(CacheMode.OFF)`
```java
/**
* Deprecated - migrate to use setBeanCacheMode(CacheMode.PUT) or other CacheMode.
* <p>
* When set to true all the beans from this query are loaded into the bean cache.
*/
@Deprecated
Query<T> setLoadBeanCache(boolean loadBeanCache);
```
2023-06-01 20:44:31 +12:00
Rob Bygrave
e5f7a28d80
Remove deprecated methods from ProfileLocation
...
These methods are no longer used.
2023-06-01 20:00:50 +12:00
Rob Bygrave
15de44eef8
Remove deprecated MetaInfoManager.collectMetricsAsJson() - move to collectMetrics().asJson()
...
Removing these deprecated methods:
- collectMetricsAsJson() -> collectMetrics().asJson();
- collectMetricsAsData() -> collectMetrics().asData()
```java
/**
* Deprecated migrate to collectMetrics().asJson().
*/
@Deprecated
default ServerMetricsAsJson collectMetricsAsJson() {
return collectMetrics().asJson();
}
/**
* Deprecated migrate to collectMetrics().asData().
*/
@Deprecated
default List<MetricData> collectMetricsAsData() {
return collectMetrics().asData();
}
```
2023-06-01 19:35:03 +12:00
robin.bygrave
4db1925328
No functional change, change use of BeanProperty.value() to BeanProperty.getValue()
...
Noting that value() currently calls through to getValue() hence
this is no real change. This is done because value() is also
a public method Property.value() [and this should probably
change to use getValueIntercept() rather than getValue()]
2023-05-17 15:31:52 +12:00
robin.bygrave
742f3b6dc4
ENH: Add captureMicros and whenCaptured to MetaQueryPlan
...
- captureMicros is the time taken to capture the specific query plan
- whenCaptured is the time when the bind values were taken
The DefaultQueryPlanListener logging will include these in the
output it logs
2023-05-16 13:47:27 +12:00
Jonas Pöhler
7ee0610db1
ADD: Test for reproducing NPE with lazyloaing in findEach under HeapPressure
...
(cherry picked from commit 96f071e08b )
2023-05-05 09:57:43 +02:00
Rob Bygrave and GitHub
95fbdf37c6
Merge pull request #3021 from ebean-orm/feature/3020-forUpdateRefresh
...
#3020 Query.forUpdate() works like REFRESH
2023-04-06 14:11:43 +12:00
Rob Bygrave and GitHub
1d09c0864d
Merge pull request #3019 from ebean-orm/refactor/method-names-ObjectGraphOrigin
...
Refactor rename getters to accessors for ObjectGraphOrigin etc
2023-04-06 14:11:23 +12:00
Rob Bygrave
1daad7af06
#3020 Query.forUpdate() works like REFRESH
...
Query.forUpdate() will load data into beans existing in the persistence context.
In discussion the thinking is that we can think of this as a bug fix.
2023-04-01 13:24:37 +13:00
Rob Bygrave
e51d6984fe
Refactor rename getters to accessors for BeanCollection, EntityBeanIntercept etc
2023-03-31 10:42:21 +13:00
Rob Bygrave
c2777b0e27
Refactor rename getters to accessors for ObjectGraphOrigin etc
2023-03-30 23:58:22 +13:00
Rob Bygrave
55d7eb55d2
Add support for dynamic formula with includes
...
e.g.
DB.find(ChildPerson.class)
.select("name, coalesce(someBean, parent.someBean) as effectiveBean") // include parent
.findList();
2023-03-25 15:49:17 +13:00
Rob Bygrave
79fd689e9a
Add support for raw SQL SubQuery expressions IN,EQ,NE,GT,GE,LT,LE,EXISTS,Not IN, Not EXISTS
...
For these expressions the SQL SubQuery is not parsed by ebean and
just used as is.
2023-03-24 22:38:52 +13:00
Rob Bygrave
fcefd94086
Fix for #3005 - Regression, Invalid SQL with RawSql in 13.15.0 due to #2996
2023-03-22 23:18:18 +13:00
Rob Bygrave and GitHub
dca13db945
Merge pull request #3002 from ebean-orm/feature/improveLogging-markedAsDeleted
...
Improve the logging around MarkedAsDeleted
2023-03-21 20:43:12 +13:00
Rob Bygrave
bd318a5d85
Improve the logging around MarkedAsDeleted
2023-03-21 20:30:39 +13:00
3d7bebd244
FIX: DB.json().toBean(target) can update existing lists ( #85 )
...
* FIX: DB.json().toBean(target) can update existing lists
* remove sys.print, typo
---------
Co-authored-by: Roland Praml <roland.praml@foconis.de >
Co-authored-by: Juri Skrobko <juri.skrobko@foconis.de >
2023-03-17 11:04:53 +01:00
Rob Bygrave
184b82e1b2
Fix test TestRawSqlQuerySelect for SqlServer
...
The order by not supported here by SqlServer
2023-03-17 18:03:37 +13:00
Rob Bygrave
04e935acd0
#2998 - SQLServer, map java long to BIGINT for bitwise expressions
2023-03-17 17:54:25 +13:00