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.
Implemented workaround for MySql not supporting offset without Limit.
Using `SELECT 1` as dummy order by since it is documented to be optimized away.
Renamed tests to match the project standard.
See also:
- https://stackoverflow.com/a/44106422
- https://stackoverflow.com/a/271650
Original pull request: #125.
We now support Dialect abstractions to consider vendor-specific deviations in SQL query rendering. Dialects support right now:
Feature flags for array support
Limit and Offset handling
The rendering is extended by considering rendering callback hook functions.
Current dialects:
Postgres SQL
SQL Server (2012)
MySQL
Original pull request: #125.
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.
INSERT and UPDATE assignments/column lists no longer include the table prefix for a column as columns as the support is Dialect-specific and we should generally assume columns in these clauses to belong to the table used in the statement.
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.
Javadoc, static factory methods, typos. Refactor SQL rendering from a shared stack-based implementation to independent delegating visitors. Introduce DelegatingVisitor and TypedSubtreeVisitor base classes. Introduce SelectList container. Extract nested renderes to top-level types.
Move SQL renderer to renderer package.
Extend In to multi-expression argument. Introduce helper methods in Table to create multiple columns. Introduce factory method on StatementBuilder to create a new builder given a collection of expressions.
Add support for comparison conditions and LIKE and equal/not equal/less with equals to/greater with equals to conditions.
Add condition creation methods to Column so Column objects can now create conditions for a fluent DSL as in (.where(left.isGreater(right)).
StatementBuilder.select(left).from(table).where(left.isGreater(right)).build().
Introduce RenderContext and RenderNamingStrategy.
Add since tags. Improve Javadoc.
Original pull request: #119.