Remove Jackson in favor of JsonHolder and PGobject usage within the domain model. Convert spaces to tabs. Reorder methods and classes.
See #920
Original pull request: #1008.
Tweak method names. Rebase onto main. Convert issue references to GH- from hash prefixed ones. Remove final keyword from variable and parameter declarations.
Original pull request: #999.
See #987
For a property of type AggregateReference one may provide an aggregate, an AggregateReference, or the id of the aggregate.
Closes#987
Original pull request: #999.
Hide actual converters by making these private classes, expose factory method to construct converters. Avoid stream API usage on converter code paths. Remove unused imports. Clean up tests.
Original pull request: #993.
See #992
Use queryForStream for streamed query results.
Since ResultSetExtractor cannot be reasonably be used together with streams it falls back to the existing collection behaviour.
Closes#578
Original pull request #903
`IsTrue` and `IsFalse` queries no longer use a literal in the query, but a bind parameter.
This allows Spring Data JDBC or the JDBC driver to convert the passed boolean value to whatever is required in the database.
For Oracle converter where added to support storing and loading booleans as NUMBER(1,0) where 0 is false and everything else is true.
Closes#908
Original pull request #983
Most supported databases don't need that conversion.
Db2 does need it and gets it through JdbcDb2Dialect.
As part of the effort it became obvious that the filtering for conversions between Date and JSR310 data types was broken.
It is fixed now, which required a dedicated reading conversion from LocalDateTime to Date for JdbcMySqlDialect.
Closes#974
Original pull request: #985.
Dialects now can define a set of known simple types the driver can handle without further interaction. This is done to avoid warnings during converter registration for types known in one environment but not the other.
Also move types around a bit, change visibility and make sure jdbc specific dialects inherit converters from their parents.
Original pull request #981
See #935
Dialects may now register a list of converters to take into consideration when reading or writing properties.
See `JdbcSqlServerDialect` for an example.
By default `OffsetDateTime` does not get converted anymore.
If a database needs a conversion it can register it by implementing `Dialect.getConverters()` as described above.
Closes#935
Original pull request #981
JDBC repository methods now support interface and DTO projections by specifying either the projection type as return type or using generics and providing a Class parameter to query methods.
Closes#971
Original pull request #980
`JdbcMappingContext` sets the SimpleTypeHolder to `JdbcSimpleTypeHolder.HOLDER` by default.
Fixing test failures where properties of type `UUID` were considered an entity by the `MappingContext`.
This in turn triggered failures when it tried to make fields of `UUID` accessible.
Removed the `UUID` field from a test entity in SD Relational, since `UUID` is not a simple type for Relational, nor a proper entity.
Replaced `@PostConstruct` with `InitializingBean` in test data source conifgurations in order avoid the requirement of importing javax.annotation-api.
Closes#975
This version of the docker container doesn't allow to use `root` as the database user name.
We still have to connect as `root` so we can create alternative schemata.
Refactor ArrayUtil into a proper utility class providing toPrimitive and toObject methods for each primitive type. Add boolean support. Move convertToObjectArray to BasicJdbcConverter as its placement in ArrayUtils creates a certain amount of ambiguity over its actual purpose.
Create unit test.
See #945
Original pull request: #949.
Deprecated Spring Data JDBC's custom PersistentProperty.isReference() in favor of the already existing ….isAssociation() with the same semantics to benefit from association definitions implemented in Spring Data Commons. Make use of the newly introduced PersistentEntity.doWithAll(…) to apply the previously existing property handling to both properties and now associations, too.
Original pull request #938
Previously, JdbcCustomConversion rejected any default converter that was not converting from and to java.util.Date. This probably stemmed from the fact that up until recently, Spring Data Commons' CustomConversions only registered date related default converters. As of spring-projects/spring-data-commons#2315 we also support jMolecules' Association and Identifier converters. We've relaxed the rejection to only explicitly reject all non Date/Time related converters if the conversion is from/to java.util.Date but allow everything else out of the box.
Original pull request #937