Jonas Pöhler
1f0ac1f1c1
ADD: Testcases for List and Map as well
2021-07-29 16:50:08 +02:00
Jonas Pöhler (JPo)
1fad6e910c
FIX: do not override empty (json) collections with null
...
Original: https://github.com/ebean-orm/ebean/commit/5551c35ec2496a9d62ab0afcaecbed739f17aa7c
Signed-off-by: Jonas Pöhler (JPo) <jonas.poehler@foconis.de >
2021-07-29 15:53:44 +02:00
rbygrave
822fb7325a
Due to mutableNext handling, with checkMutableProperties() even when known dirty go into beanProperty.checkMutable()
...
As per rPraml's PR and comment
Due to handling of mutableNext we need checkMutableProperties() to call into what is now beanProperty.checkMutable() even when we already know it's dirty.
2021-07-29 23:37:29 +12:00
rbygrave
20e0eb1021
Re-enable TestDbJson_Jackson3 via adding mutationDetection = HASH to beanList property
...
@DbJsonB(mutationDetection = HASH)
List<PlainBean> beanList;
2021-07-29 23:17:11 +12:00
rbygrave
20becf951d
Use MutationDetection replacing dirtyDetection and keepSource
...
Also adds NoMutationDetection to support NONE
2021-07-29 23:11:42 +12:00
rbygrave
5aa8557168
Update tests only - TestJacksonPlainBean with dirtyDetection = false property
2021-07-29 16:29:10 +12:00
rbygrave
c66d248e96
Add MutableValueNext to replace mutableContent such that hash compute is only done once
...
Adds MutableValueInfo.nextDirty() to replace the isEqualToJson() method. The next is computed once and stored. BindablePropertyJsonUpdate makes the .mutableNext(propertyIndex) call to move the next MutableValueInfo and return the json content.
2021-07-29 15:42:16 +12:00
rbygrave
0d8e7c852b
Change Checksum to use CRC32
2021-07-29 15:32:06 +12:00
rbygrave
991c6d6b5c
No effective change - tidy FactoryProperty
2021-07-29 13:30:15 +12:00
rbygrave
2bc5d3d325
Refactor rename MutableHash to MutableValueInfo (and subsequent rename on methods etc)
2021-07-29 13:20:30 +12:00
rbygrave
5ad8e7ead4
Use new @DbJson dirtyDetection and keepSource attributes
...
- Bump ebean-annotation with new @DbJson dirtyDetection and keepSource attributes
- Get those to BeanPropertyJsonMapper to chose MutableHash implementation
- Modify MD5MutableHash to include check for isDirty()
- EBasicJsonList needs keepSource=true to pass that test with oldValue
2021-07-29 12:47:10 +12:00
rbygrave
8832bbc57f
No effective change - format EntityBeanIntercept only
...
Plus adjust timing on SqlQueryCancelTest
2021-07-29 12:43:37 +12:00
rbygrave
86483ff947
Use scalarType.format(value) removing scalarType.jsonMapper(value)
...
Remove scalarType.jsonMapper(value) as we can just use format(value) instead
2021-07-29 11:52:15 +12:00
rbygrave
92d7a7562f
Tidy only - no functional change to MutableHash and BeanPropertyJsonMapper
2021-07-29 11:49:01 +12:00
rbygrave
52fe3cf3c8
Change from MD5 to Checksum (Adler32) for json content dirty detection
2021-07-29 11:40:05 +12:00
rbygrave
94fb6414fa
Refactor move createMutableHash() method from ScalarType to BeanProperty / BeanPropertyJsonMapper
2021-07-29 11:28:25 +12:00
rbygrave
d0270dbc6a
Temporarily disable TestDbJson_Jackson3 updateIncludesJsonColumn_when_list_loadedAndNotDirtyAware()
...
BeanState state = DB.getBeanState(found);
assertThat(state.getChangedProps()).containsExactlyInAnyOrder("beanList");
// this test fails, because we have a OmList instead of a GenericObject
// TODO: Can/Should we enhance the @DbJson/@DbJsonB annotations with a property "dirtyDetection"
2021-07-29 11:21:38 +12:00
rbygrave
11a047bf8e
Merge branch 'FOCONIS-feature/json-dirty-detection-md5' into feature/json-dirty-detection-md5
2021-07-29 10:27:28 +12:00
Roland Praml
eb70c7e196
some javadoc and refactored getOrigValue
2021-07-28 17:36:53 +02:00
Roland Praml
b497b8635b
some refactor and tidying
2021-07-28 17:22:29 +02:00
Roland Praml
5e595ec5f8
Proof of concept to support also bean change detection / changelog on mutable properties
2021-07-28 14:54:56 +02:00
rbygrave
49b86d07d3
Modify SqlBeanLoad to use readSet()
...
Note that we don't need to use readSetIntercept() now as there is no property change listener support
2021-07-28 22:48:29 +12:00
rbygrave
11eed4cfe9
Add BeanPropertyJsonMapper for JSON dirty detection
2021-07-28 21:43:57 +12:00
rbygrave
4aef0ad459
#2275 - Change Query<?> to Query<T> on ExtendedServer exists() method
2021-07-28 17:23:37 +12:00
Rob Bygrave and GitHub
21cd74d0ca
Merge pull request #2273 from ebean-orm/feature/2272
...
#2272 Fix for collection with orphanRemoval (such that equals/hashCode isn't use)
2021-07-28 17:14:09 +12:00
rbygrave
6c262f1df5
JSON bean dirty detection via MD5 of JSON string content
...
- MD5 of json content stored on EntityBeanIntercept for dirty detection
- Only convert to JSON once (at dirty detection time). Store this json content on EntityBeanIntercept to later push to ScalarTypeJsonObjectMapper for bind
Should consider alternative to extend BeanProperty rather than have these if blocks.
2021-07-23 16:50:24 +12:00
rbygrave
f32ace4e5a
Refactor EntityBeanIntercept replacing owner._ebean_getPropertyNames().length with flags.length
2021-07-23 13:54:29 +12:00
rbygrave
e54b7052e0
#2272 Fix for collection with orphanRemoval (such that equals/hashCode isn't use)
...
- Changes ModifyHolder to use IdentityHashMap such that equals/hashcode isn't invoked
- Change SaveManyBeans such that M2M intersection deletes execute before inserts
The SaveManyBeans change is required to pass TestM2MModifyTest. With that test we get a delete/insert pair that we somewhat expect because we clear() the collection. Previously equals/hashCode meant we didn't get that delete/insert pair.
The test changes from containsExactly() to containsOnly() as we now can't guarantee the ordering with IdentityHashMap.
2021-07-23 12:18:06 +12:00
rbygrave
b40d448955
#2272 No effective change, tidy test TestM2MModifyTest only
...
Noting that this test fails with the fix for 2272 as M2M intersection deletes are currently executed after inserts. We need a fix to SaveManyBeans to change that so that deletes to intersection table execute after inserts.
2021-07-23 12:01:36 +12:00
rbygrave
33bccd3bcb
[maven-release-plugin] prepare for next development iteration
2021-07-22 19:03:54 +12:00
rbygrave
705e4f4098
[maven-release-plugin] prepare release ebean-parent-12.10.0
ebean-parent-12.10.0
2021-07-22 19:03:43 +12:00
rbygrave
1642833fdb
Improve javadoc on TQRootBean and generated javadoc on query bean forFetchGroup() method
2021-07-22 18:56:02 +12:00
rbygrave
492bb98e0e
#2269 - findSingleAttributeList does not filter soft-deleted record
2021-07-22 17:12:06 +12:00
rbygrave
a8456f90db
Bump ebean-agent version to 2.10.0
2021-07-22 16:46:57 +12:00
Rob Bygrave and GitHub
103b75172d
Merge pull request #2267 from FOCONIS/pr/bugfix/connection_closed_on_clob
...
Retrieve (C|B)LOB on SqlRow construction
2021-07-22 16:44:05 +12:00
rbygrave
0baa3a0eac
#2270 - ebean-agent enhancement NPE with MappedSuperclass with no properties that uses named database
2021-07-22 16:38:28 +12:00
rbygrave
f26e4b5381
Bump jedis to 3.6.3 (from 3.6.1)
2021-07-22 12:37:42 +12:00
Jonas Pöhler
60ef87b269
Merge remote-tracking branch 'ebean/master' into pr/enh/softreference_in_cache
2021-07-16 15:29:33 +02:00
Jonas Pöhler
3d4de4dee5
FIX TestRawSqlService and TestRawSqlBuilder
2021-07-16 15:17:04 +02:00
Jonas Pöhler
c621435a28
Merge remote-tracking branch 'ebean/master' into pr/bugfix/connection_closed_on_clob
2021-07-16 13:32:24 +02:00
rbygrave
7408483a43
#2264 - Use of default timezone for OffsetDateTime offsets problematic for unit tests and presentation layer
2021-07-15 17:14:22 +12:00
Roland Praml
7e265f7bde
FIX: SubQuery with fetch-path does not work correctly
2021-07-13 09:09:30 +02:00
rbygrave
4d15535381
No functional change - tidy DefaultDbSqlContext
2021-07-13 16:48:45 +12:00
Rob Bygrave and GitHub
787c2f90f2
Merge pull request #2188 from FOCONIS/fix-order-by
...
FIX: orderBy does not work when used on formula property
2021-07-13 16:41:33 +12:00
Rob Bygrave and GitHub
e590a2149d
Merge pull request #2257 from FOCONIS/queries-are-cancelable
...
Queries are cancelable
2021-07-13 16:11:36 +12:00
rbygrave
8c77740aa7
Bump version tp 12.10.0-SNAPSHOT (with 12.9.4-RC1 ddl generator)
2021-07-13 15:48:10 +12:00
Rob Bygrave and GitHub
29582b57f7
Merge pull request #2256 from FOCONIS/many-where-support
...
Improved @Where support, especially for Many-to-many tables
2021-07-13 15:01:49 +12:00
rbygrave
2763f333d4
#2262 - Tidy tests for Transaction postCommit Callback
2021-07-13 14:48:40 +12:00
rbygrave
8840628d34
#2262 - Transaction postCommit Callback not invoked when the active transaction has no database writes
2021-07-13 14:45:48 +12:00
rbygrave
6fb28d7ded
#2255 Specific test for setParameter cannot assigning the value when parameter in selecting section of query
2021-07-13 12:54:21 +12:00