By setting project.root, Javadoc is aggregated in the parent pom target so it can be collected during the distribution build.
Original pull request: #168.
Avoid Stream usage in favor of a simple for loop in event triggering in JdbcAggregateTemplate. Tweaked JdbcMappingContext to verify the presence of parameter names on metadata creation. Avoid the re-resolution of the column name for a property by caching the resolved column name. This significantly improves performance as it avoids repeated parsing and concatenation of strings. Added caching to PersistentPropertyPathExtension.
An `EntityCallback` works very similar to an `ApplicationEvent` but returns a potentially changed instance.
The returned instance will be used in further processing which enables proper event handling for immutable classes.
Auditing was changed to use a callback making it work also with immutable objects.
Original pull request: #161.
When an event listener is used to set an id before saving it, this ensures the auditing happens before setting the id.
If this is not ensured the auditing listener doesn't consider the entity as new and doesn't set created date and created by user.
Original pull request: #159.
We now ship MyBatisJdbcConfiguration as an alternative to (Abstract)JdbcConfiguration to tweak the DataAccessStrategy bean registered to create one that tries MyBatis mappings first but still delegates to the default one.
We now declare DataAccessStrategy as bean again as using a custom default caused the lazy resolution of a RelationResolver to break. Changed the signatures to avoid cross method invocations and allow us to declare the class to not need proxying.
Added integration tests to make sure the components that should be registered are actually registered and the configuration class is useable in the first place. With that in place, the broken cycle would've been caught immediately.
This avoids having multiple beans of that type in an ApplicationContext when a custom DataAccessStrategy needs to be provided.
Original pull request: #160.
Currently there seems to be now well maintained https resource for MyBatis DTDs.
We therefore use the tagged sources directly for now.
See also: https://github.com/mybatis/mybatis-3/issues/1559
findAllByPath now falls back to the older findAllByProperty for better backward compatibility.
Also the path is included in the query name used for MyBatis.
Original Pull Request: #157
The onEmpty attribute allows to define if an embedded entity should be set to null or a default instance if all properties backing the entity are actually null.
@Embedded(onEmpty = USE_NULL)
EmbeddedEntity embeddedEntity;
Original pull request: #154.
Simplify conditionals with nested ternary operators. Migrate RelationResolver.findAllBy to returning Iterable of Object instead of T as there is no type contract present. Use Spring utilities where applicable. Simplify tests. Fix warnings, Javadoc, Formatting.
Original pull request: #153.
Also solved DATAJDBC-369 since it made refactoring easier.
Known limitation: Back-references to intermediate key columns currently can't get renamed and use the name defined by the property where they become part of the path.
Backward compatibility of the JdbcConfiguration is still broken.
Original pull request: #153.
We now allow read and write of Objects annotated with Embedded that are actually null.
When writing all contained fields will be nulled.
Reading back the entity considers an embedded object to be null itself if all contained properties are null within the backing result.
Relates to DATAJDBC-364
Original Pull Request: #151
We tried to set all the properties, even when they were already set via constructor.
Fixed it by unifying the three instances where we created and populated instances.
Original Pull Request: #151
Deprecate remaining DataAccessStrategy types in jdbc.core and create replacements in jdbc.core.convert. Migrate using code to replacement types.
Simplify warnings and if flows. Add since version to deprecations.
Move MyBatisDataAccessStrategyUnitTests from core to mybatis package.
Original pull request: #150.
Introduced a `ReadingContext` in the `EntityRowMapper` to avoid passing the `ResultSet` and the `path` all over the place.
Added a dependency test to Spring Data Relational and fixed the test failure by moving the PersistentPropertyPathExtension to core.mapping.
Original pull request: #150.