Robin Bygrave
bb73c30bb7
#2199 - ScalarTypeWrapper doesn't handle "nullValue" correctly
...
Fix for - standard JPA AttributeConverter which doesn't have the getNullValue method, he/she can't convert null to a custom null object
AttributeConverterAdapter probes the AttributeConverter for the nullValue rather than just assuming it is null.
2021-03-18 16:14:46 +13:00
Robin Bygrave
2e16f05a70
#2199 - ScalarTypeWrapper doesn't handle "nullValue" correctly
...
Handles the case for ScalarTypeConverter with custom null value and binding the custom null value (via query parameter, CallableSql parameter etc)
2021-03-18 10:03:35 +13:00
Robin Bygrave
1837c3443d
#2186 - Invalid generated table and column names of @ManyToMany relation with allQuotedIdentifiers=true
2021-03-17 21:02:59 +13:00
Robin Bygrave
c2a87a0c88
#2196 - SQLException:Column "T0.ID" must be in the GROUP BY list - when findCount with having clause
2021-03-15 22:43:25 +13:00
Robin Bygrave
733886c70b
#2195 - @Aggregation on OneToMany property not mapping to column properly
2021-03-15 22:03:14 +13:00
Robin Bygrave
e6faf9efd1
#2193 - Prevent registration of 2 default servers (2 Database that have defaultServer=true)
2021-03-11 23:21:44 +13:00
Rob Bygrave
2bb5a85bd6
ENH: Add Query findEach() with batch consumer
...
This is a variation of findEach() that makes it easy to have a batch consumer processing a large result in batches. For example, process in batches of 50 beans.
Note that the last batch consumed/processed will often have less than the batch size.
2021-03-10 00:18:35 +13:00
Roland Praml
ef1143bb70
FIX: orderBy does not work when used on formula property or in conjunction with "exists" query
2021-03-02 15:26:29 +01:00
Robin Bygrave
81e445e386
#2184 - Fix for findNative() with fetch() - convert fetch to fetchQuery with nativeSql
...
When using nativeSql (think of it as the "root query") we can't use "fetch joins" (FetchConfig.ofDefault()) as that means to prefer to use a SQL JOIN. In this nativeSql case we need to effectively automatically convert fetch() to fetchQuery()
2021-03-02 15:47:07 +13:00
Robin Bygrave
2cbbbc4419
Merge branch 'master' of https://github.com/ebean-orm/ebean
2021-03-02 15:32:40 +13:00
Robin Bygrave
f416309863
No effective change - change DefaultOrmQuery methods to return Query<T> rather than DefaultOrmQuery<T>
...
This is no effective functional change but we do need to update the test OrmQueryPlanKeyTest to cast now.
2021-03-02 14:44:54 +13:00
Ben Kempe
79dde23ec6
added tests for findNative fetches
2021-03-01 12:16:22 +01:00
Robin Bygrave
6897e06dcd
Merge branch 'nested_fetch_duplicates' of https://github.com/bkempe/ebean into bkempe-nested_fetch_duplicates
2021-03-01 10:23:49 +13:00
Ben Kempe
d036af8d1a
Add more assertions for nested one-to-many fetch
2021-02-28 19:06:51 +01:00
Rob Bygrave and GitHub
6aa4337b27
#2174 - Entity beans with @Cache + @DbArray of enums (or UUID or Integer) not converted to enums (come back as String) ( #2175 )
2021-02-19 22:42:48 +13:00
André Camilo and GitHub
3bb4126e26
#2169 Support for jakarta.validation.constraints.NotNull and ( #2170 )
...
jakarta.validation.constraints.Size
2021-02-17 18:04:43 +13:00
Rob Bygrave and GitHub
98a89156bf
Refactor query internals to reduce property parsing for partial select and fetch ( #2167 )
...
* Update test only - update TestBasicClobNoVer to use DB and AssertJ
* Refactor OrmQueryProperties internals to reduce raw property parsing
- Remove String properties
- Reduces parsing of properties via fetchProperties() selectProperties() methods
* No effective change - tidy pom.xml for ebean-querybean
* Refactor query internals adding fetchProperties() selectProperties()
- Adds SpiQueryFetch
- Used by query beans with Set<String> properties passed (effectively skipping any parsing)
2021-02-16 17:51:47 +13:00
Rob Bygrave and GitHub
a6fdc42934
Remove support for "query hints" like +query(50) ( #2163 )
...
* Remove support for "query hints" like +query(50)
* Remove unused readOnly from OrmQueryProperties
* OrmQueryProperties cache as final field
2021-02-14 11:21:10 +13:00
rob bygrave
9e3d6c6a08
#2165 - Joda LocalDate West of UTC converts incorrectly (Fix: change from epoc millis conversion to y/m/d conversion)
2021-02-14 10:28:55 +13:00
rob bygrave
7069d3f600
Update tests to use fetchQuery and fetchLazy rather than FetchConfig
2021-02-13 12:31:00 +13:00
rob bygrave
f1a48b182e
Refactor FetchConfig
2021-02-13 12:10:21 +13:00
Rob Bygrave and GitHub
8ac5467856
Improve internal calculation of orm query plan hash key (Require use of inline hints like +query(50) to be comma delimited with properties) ( #2159 )
...
* WIP Tidy DefaultOrmQuery planDescription()
* WIP Tidy DefaultOrmQuery planDescription()
* Refactor OrmQueryPropertiesParser with hints requiring comma delimiting (previously didn't)
* Refactor OrmQueryPropertiesParser (reuse inputProperties) and DRawSqlColumnsParser (to return Set)
* Refactor OrmQueryPropertiesParser - remove JunkMain
* Refactor OrmQueryDetail, OrmQueryProperties - properties
2021-02-13 11:58:00 +13:00
rob bygrave
b56d68dac7
#2157 - ManyToMany mapping to itself results in broken generated SQL DDL when not defining @JoinTable.
2021-02-12 22:17:04 +13:00
rob bygrave
e0c3a92b60
Refactor FetchConfig
2021-02-12 21:01:57 +13:00
Rob Bygrave and GitHub
d3a09b93c0
#2156 - Using @OneToOne(targetEntity...) with Interface field results in BeanNotRegisteredException ( #2160 )
2021-02-12 16:30:28 +13:00
Robin Bygrave
d57657c209
#2127 - Fix for - Adding a new list of children to @OneToMany with orphanRemoval true does not delete existing orphans
...
Modifies EntityBeanIntercept preSetterMany to set the changed state on the many property and use this in SaveManyBeans to detect when the existing beans need orphan removal
2021-02-04 15:45:19 +13:00
Robin Bygrave
dd080c5933
Test only change - refactor update TestBeanState
2021-02-04 15:19:34 +13:00
Rob Bygrave and GitHub
0be98d7989
Fix to only cancel query once ( #2152 )
...
Change DefaultOrmQuery.cancel() to call underlying jdbc cancel once
- Refactor tidy already cancelled check (pre query execution)
- Remove unnecessary extra transaction.end() call on future query execution (as already handled by CallableQueryList etc)
2021-02-03 14:51:42 +13:00
Robin Bygrave
e38059f52c
#2149 - Fix for ADD: jdbc batch flush doesnt execute sql statements created in lifecycle methods (e.g. beans saved in PostInsert etc)
...
Note that the foconis fork has a onPersist extension which is removed from the test.
2021-01-22 14:00:48 +13:00
Robin Bygrave
72331aa945
Merge branch 'prePersist-postPersist-fix-batch-flush-12' of https://github.com/FOCONIS/ebean into FOCONIS-prePersist-postPersist-fix-batch-flush-12
2021-01-22 13:14:05 +13:00
Robin Bygrave
b44091ff3a
#2147 Fix for ADD: multiple to many outer joins cause wrong count in distinct count…
...
Copy of Rolands fix in FOCONIS branch. This also brings over some of the extra tests found there.
Note that the SQL is slightly different from the FOCONIS branch in that there is additional foreign key columns included in the sub-query select clause.
2021-01-21 16:56:42 +13:00
Robin Bygrave
23541e661e
Merge branch 'count-distinct-with-two-joins-12' of https://github.com/FOCONIS/ebean into FOCONIS-count-distinct-with-two-joins-12
2021-01-21 14:45:56 +13:00
trojo
6778e37652
ADD: batch flash doesnt execute sql statements created in lifecycle methods
2021-01-20 17:43:14 +01:00
rob bygrave
5eac31283d
#2148 - PersistenceException: No ScalarType registered for class java.util.LinkedHashMap
2021-01-20 23:31:45 +13:00
trojo
38016773d4
added comments
2021-01-20 10:47:53 +01:00
trojo
ad80eb267f
ADD: multiple to many outer joins cause wrong count in distinct count queries
2021-01-20 09:57:25 +01:00
rob bygrave
f28f5c9a01
#2146 - no change - Tidy test only TestWithCacheAndLazyLoad
2021-01-20 21:37:29 +13:00
rob bygrave
b47eec99a5
Merge branch 'cache-with-lazyload-wrong-12' of https://github.com/FOCONIS/ebean into FOCONIS-cache-with-lazyload-wrong-12
2021-01-20 20:36:18 +13:00
Robin Bygrave
4408eb618a
No change - update test only - TestHistoryOneToMany with wait for when run on windows
2021-01-20 17:11:07 +13:00
rob bygrave
0c1657fef5
#2145 - SoftDelete predicate missing on join to ManyToOne supporting predicate expression
2021-01-20 00:00:27 +13:00
Noemi Szemenyei
ee393c6485
ADD: testcase for wrong lazyload with cache
2021-01-19 11:41:19 +01:00
Roland Praml
b7feb62ecd
ADD: testcase for broken lazyload
2021-01-11 11:50:05 +01:00
rob bygrave
d8f4503d98
#2141 - Fix for failing test, revert of fix for #2127
2021-01-05 17:56:55 +13:00
Tobias
69e56be459
Failing testcase that shows wipe of all old children on save
...
When adding a child to a newly saved bean (A), all other children are
killed on save of A.
2020-12-28 15:35:15 +01:00
Tobias
fc1c9392aa
Failing testcase that shows wipe of all children on save
...
When adding a newly saved bean (A) to another bean (B), all children
in A are wiped on saving B.
2020-12-21 15:32:40 +01:00
rob bygrave
400ae3cf4b
#2138 - Mark Transaction.flushBatch() as deprecated - migrate to flush();
2020-12-21 14:58:04 +13:00
rob bygrave
e98ff952bf
#2137 - Expected Transaction flush on SqlQuery and DtoQuery not occurring
2020-12-21 14:11:28 +13:00
rob bygrave
1bdc6d8f7f
#2134 - Modify ChangeLog to send the last set of changes Pre Commit (rather than post commit). Expose this for spring transactions.
2020-12-18 14:54:44 +13:00
Rob Bygrave and GitHub
55324653a5
#2127 - Adding a new list of children to @OneToMany with orphanRemoval true does not delete existing orphans ( #2131 )
2020-12-16 15:36:44 +13:00
rob bygrave
7389a8b344
#2124 - ENH: Add name() attribute to @DbArray, @DbJson, @DbJsonB, @DbMap
2020-12-07 22:46:04 +13:00