rbygrave
e62bb3dc6b
Merge branch 'pr/bugfix/null_to_empty_json_collection' of https://github.com/FOCONIS/ebean into FOCONIS-pr/bugfix/null_to_empty_json_collection
2021-07-30 22:51:40 +12:00
Rob Bygrave and GitHub
604099429e
Merge pull request #2282 from ebean-orm/feature/json-mutable-collections
...
Treat json Jackson collections the same wrt mutation detection
2021-07-30 21:15:04 +12:00
Rob Bygrave and GitHub
11dc7f64ba
Merge pull request #2274 from ebean-orm/feature/json-dirty-detection-md5
...
Add support for JSON bean mutation detection via HASH and SOURCE of JSON string content
2021-07-30 21:11:42 +12:00
rbygrave
ceea705a76
Treat json Jackson collections the same wrt mutation detection
2021-07-30 20:20:03 +12:00
rbygrave
d9f7531e81
Tidy tests only - TestDbJson_Jackson3 TestJacksonPlainBean
2021-07-30 17:26:46 +12:00
rbygrave
7bd7640c63
Update test TestDbJson_Jackson3 showing HASH mode is used even on ModifyAwareType
2021-07-30 17:18:28 +12:00
rbygrave
ca1636ff9e
Fix when json/jackson bean inserted as null and not changed
...
Expectation is that it is not included in update (still null, no change)
2021-07-30 17:16:05 +12:00
rbygrave
ea741d0169
Update TestDbJson_Jackson3 with comments
2021-07-30 15:41:52 +12:00
rbygrave
c43e2e6956
Update TestDbJson_Jackson3
2021-07-30 15:34:54 +12:00
rbygrave
03004452ac
ebean.mf set back to synthetic: true
2021-07-30 14:53:32 +12:00
rbygrave
a470877017
Update kotlin-querybean-generator pom to make kotlin in IntelliJ happy
2021-07-30 14:52:49 +12:00
rbygrave
777d322222
#2279 - Remove _ebean_getMarker() from EntityBean interface - not actually required
2021-07-30 14:51:38 +12:00
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
3d4de4dee5
FIX TestRawSqlService and TestRawSqlBuilder
2021-07-16 15:17:04 +02:00