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.
Encapsulate column caches in Columns type.
Relax RelationalMappingContext to MappingContext with appropriate generics. Remove unused SQL generator source. Cache table and Id column objects. Simplify assertions. Consistently use naming pattern for named parameters.
Migrate http URLs to https.
Original pull request: #147.
SqlGenerator basically got rewritten using the new SQL rendering API.
The SQL rendering API got some minor improvements in the process.
The whole generation process is now based on paths instead of properties which makes the actual logic of the construction much more obvious.
Original pull request: #147.
Extend Javadoc. Reorder constructors in the order of their parameter number. Add missing assertions. Introduce utility to create predicates. Remove unused fields. Add since tags. Reformat.
Original pull request: #123.
Some JDBC drivers depend on correct explicit type information in order to pass on parameters to the database.
So far CustomConversion had no way to provide that information.
With this change one can use @WritingConverter that converts to JdbcTypeAware in order to provide that information.
byte[] now also get stored as BINARY.
Original pull request: #123.
Ids used as backreferences now get properly converted.
Introduced Identifier to hold information about data that needs to be considered for inserts or updates but is not part of the entity.
Apart from column names and values they also hold information about the desired JdbcType in order to facilitate conversions.
This replaces the Map handed around in the past.
Original pull request: #118.
When a column has a quoted name it contains characters illegal for parameter names.
Therefore the parameter names now get sanitised.
Original pull request: #120.
Simplify column name discovery using Optionals utility methods. Add test to verify Column annotation precedence.
Javadoc, formatting.
Original pull request: #117.
We now provide a @MappedCollection annotation as replacement for @Column's keyColumn attribute.
class Person {
@MappedCollection(idColumn = "the_id", keyColumn = "the_key")
private List<Integer> mappedList;
}
Original pull request: #117.
Reverting breaking changes to JdbcConfiguration.
Deprecating JdbcConfiguration in favor of AbstractJdbcConfiguration.
Cleaning up the API to separate it from spring-data-relational and therefore R2DBC.
Original pull request: #116.