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.
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.
Improved formatting, added author tags and issue comments.
Changed "entity" to "aggregate" in test names to make it more precise.
Original pull request: #94.
AggregateReferences can be used to reference other aggregates via their aggregate root without making them part of the referencing aggregate.
I.e. the referenced entities will not be included in SQL statements for the referencing aggregates, apart from their id.
Conversion between AggregateReferences and their ids and vice versa is done by the RelationalConverter.
Upgraded the dependency-plugin.
Configured matrix build for travis, allowing the JDK 11 build to fail.
The failure should go away once the Spring Framework version we use include the fix for SPR-17093.
Removed Jacoco from the build for JDK 10+.
The id-property was used to determine if there is an instance at all, or if it was null.
For entities that don't have an id that purpose is now fulfilled by selecting the backreference and checking it against null.
See also: DATAJDBC-223.
Previously, SimpleJdbcRepository.save(…) returned the original instance as result of the operation. That assumed that the JdbcAggregateOperations would only manipulate that instance, not return a new one. We now properly return the result of the delegating method call.
The entity creation not skips the property population entirely if the metamodel indicates that the instantiation already creates a complete entity. If there's need to actively populate properties, we now correctly skip the ones already consumed by the constructor.
Original pull request: #86.
If a parent DbAction does not offer a generated id, the id of the entity is used instead. This behavior was broken by DATAJDBC-241.
Related tickets: DATAJDBC-241.
Original pull request: #85.
Immutable entities can now be saved and loaded and the immutability will be honored.
This feature is currently limited to a single level of reference.
In order to implement this the logic for updating IDs with those generated from the database got moved out of the DefaultDataAccessStrategy into the AggregateChange.
As part of that move DataAccessStrategy.save now returns a generated id, if available.
See also: DATAJDBC-248.