Commit Graph

208 Commits

Author SHA1 Message Date
Oliver Drotbohm
c1e460bd9f DATAJDBC-395 - Added dedicated configuration class for MyBatis integration.
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.
2019-07-12 16:47:30 +02:00
Jens Schauder
b7ee1bbbb0 DATAJDBC-395 - AbstractJdbcConfiguration no longer registers a bean of type DataAccessStrategy.
This avoids having multiple beans of that type in an ApplicationContext when a custom DataAccessStrategy needs to be provided.

Original pull request: #160.
2019-07-11 10:44:46 +02:00
Jens Schauder
49b71fe366 DATAJDBC-383 - Changing Mybatis documentation link to https. 2019-06-18 14:12:27 +02:00
Christoph Strobl
751cbb5102 DATAJDBC-360 - Prepare 1.1 RC1 (Moore). 2019-06-14 14:43:17 +02:00
Christoph Strobl
f51d4c2161 DATAJDBC-360 - Updated changelog. 2019-06-14 14:43:07 +02:00
Christoph Strobl
c7b85f8645 DATAJDBC-372 - Updated changelog. 2019-06-14 13:27:13 +02:00
Jens Schauder
bd03ef83d6 DATAJDBC-384 - Fixed MyBatisDataAccessStrategy.findAllByPath.
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
2019-06-13 13:42:58 +02:00
Jens Schauder
ebe76a0c7f DATAJDBC-374 - Polishing.
Clarified the effects of collections on nullable embedded entities.

Original pull request: #154.
2019-05-22 12:49:17 +02:00
Christoph Strobl
55a3f9c372 DATAJDBC-374 - Introduce shortcuts for Embedded#onEmpty(…)
@Embedded.Nullable & @Embedded.Empty offer shortcuts for @Embedded(onEmpty = USE_NULL) and @Embedded(onEmpty = USE_EMPTY) to reduce verbositility and simultaneously set JSR-305 @javax.annotation.Nonnull accordingly.

    @Embedded.Nullable
    EmbeddedEntity embeddedEntity;

Original pull request: #154.
2019-05-22 12:47:24 +02:00
Christoph Strobl
5830b83cf4 DATAJDBC-374 - Add onEmpty attribute to Embedded annotation.
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.
2019-05-22 12:46:46 +02:00
Mark Paluch
c87d8b8d31 DATAJDBC-371 - Updated changelog. 2019-05-13 14:59:24 +02:00
Mark Paluch
ca36007c24 DATAJDBC-363 - Prepare 1.1 M4 (Moore). 2019-05-13 11:59:04 +02:00
Mark Paluch
5aa12504c8 DATAJDBC-363 - Updated changelog. 2019-05-13 11:58:52 +02:00
Oliver Drotbohm
d0c432d029 DATAJDBC-351 - Updated changelog. 2019-05-10 12:57:19 +02:00
Christoph Strobl
98fb114750 DATAJDBC-337 - Prepare 1.1 M3 (Moore). 2019-04-11 11:23:56 +02:00
Christoph Strobl
e5d04bf6d8 DATAJDBC-337 - Updated changelog. 2019-04-11 11:23:49 +02:00
Oliver Drotbohm
4923ba7076 DATAJDBC-333 - Updated changelog. 2019-04-01 20:56:25 +02:00
Spring Operator
913238a822 DATAJDBC-336 - URL Cleanup.
This commit updates URLs to prefer the https protocol. Redirects are not followed to avoid accidentally expanding intentionally shortened URLs (i.e. if using a URL shortener).

# Fixed URLs

## Fixed Success
These URLs were switched to an https URL with a 2xx status. While the status was successful, your review is still recommended.

* [ ] http://www.apache.org/licenses/ with 1 occurrences migrated to:
  https://www.apache.org/licenses/ ([https](https://www.apache.org/licenses/) result 200).
* [ ] http://www.apache.org/licenses/LICENSE-2.0 with 282 occurrences migrated to:
  https://www.apache.org/licenses/LICENSE-2.0 ([https](https://www.apache.org/licenses/LICENSE-2.0) result 200).

Original Pull Request: #140
2019-03-22 11:22:54 +01:00
Spring Operator
17128311f4 DATAJDBC-336 - URL Cleanup.
This commit updates URLs to prefer the https protocol. Redirects are not followed to avoid accidentally expanding intentionally shortened URLs (i.e. if using a URL shortener).

# HTTP URLs that Could Not Be Fixed
These URLs were unable to be fixed. Please review them to see if they can be manually resolved.

* [ ] http://www.mybatis.org/mybatis-3/logging.html (200) with 1 occurrences could not be migrated:
   ([https](https://www.mybatis.org/mybatis-3/logging.html) result SSLHandshakeException).

# Fixed URLs

## Fixed Success
These URLs were switched to an https URL with a 2xx status. While the status was successful, your review is still recommended.

* [ ] http://en.wikipedia.org/wiki/Dependency_Injection with 2 occurrences migrated to:
  https://en.wikipedia.org/wiki/Dependency_Injection ([https](https://en.wikipedia.org/wiki/Dependency_Injection) result 200).
* [ ] http://github.com/spring-projects/spring-data-jdbc with 1 occurrences migrated to:
  https://github.com/spring-projects/spring-data-jdbc ([https](https://github.com/spring-projects/spring-data-jdbc) result 200).
* [ ] http://spring.io/blog with 2 occurrences migrated to:
  https://spring.io/blog ([https](https://spring.io/blog) result 200).
* [ ] http://stackoverflow.com/questions/tagged/spring-data-jdbc with 2 occurrences migrated to:
  https://stackoverflow.com/questions/tagged/spring-data-jdbc ([https](https://stackoverflow.com/questions/tagged/spring-data-jdbc) result 200).
* [ ] http://contributor-covenant.org with 1 occurrences migrated to:
  https://contributor-covenant.org ([https](https://contributor-covenant.org) result 301).
* [ ] http://contributor-covenant.org/version/1/3/0/ with 1 occurrences migrated to:
  https://contributor-covenant.org/version/1/3/0/ ([https](https://contributor-covenant.org/version/1/3/0/) result 301).
* [ ] http://docs.spring.io/spring-data/data-commons/docs/current/api/index.html?org/springframework/data/domain/Persistable.html with 1 occurrences migrated to:
  https://docs.spring.io/spring-data/data-commons/docs/current/api/index.html?org/springframework/data/domain/Persistable.html ([https](https://docs.spring.io/spring-data/data-commons/docs/current/api/index.html?org/springframework/data/domain/Persistable.html) result 301).
* [ ] http://docs.spring.io/spring-framework/docs/ with 1 occurrences migrated to:
  https://docs.spring.io/spring-framework/docs/ ([https](https://docs.spring.io/spring-framework/docs/) result 301).
* [ ] http://help.github.com/forking/ with 2 occurrences migrated to:
  https://help.github.com/forking/ ([https](https://help.github.com/forking/) result 301).
* [ ] http://projects.spring.io/spring-data with 2 occurrences migrated to:
  https://projects.spring.io/spring-data ([https](https://projects.spring.io/spring-data) result 301).
* [ ] http://projects.spring.io/spring-framework with 2 occurrences migrated to:
  https://projects.spring.io/spring-framework ([https](https://projects.spring.io/spring-framework) result 301).
* [ ] http://www.springsource.org/download with 1 occurrences migrated to:
  https://www.springsource.org/download ([https](https://www.springsource.org/download) result 302).

Original Pull Request: #133
2019-03-21 10:07:21 +01:00
Mark Paluch
78f26aa0a7 DATAJDBC-327 - Polishing.
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.
2019-03-12 12:32:24 +01:00
Jens Schauder
ceb15fe826 DATAJDBC-327 - Add support for conversion to JdbcValue and store byte[] as binary.
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.
2019-03-12 12:32:24 +01:00
Christoph Strobl
c958a2c0d0 DATAJDBC-308 - Prepare 1.1 M2 (Moore). 2019-03-07 09:41:17 +01:00
Christoph Strobl
722d5af548 DATAJDBC-308 - Updated changelog. 2019-03-07 09:41:09 +01:00
Mark Paluch
61a54cac84 DATAJDBC-331 - Polishing.
Simplify column name discovery using Optionals utility methods. Add test to verify Column annotation precedence.

Javadoc, formatting.

Original pull request: #117.
2019-02-13 17:19:25 +01:00
Bastian Wilhelm
6fcff3ea80 DATAJDBC-331 Introduce @MappedCollection annotation.
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.
2019-02-13 17:17:40 +01:00
Mark Paluch
1c0bd4fdb8 DATAJDBC-317 - Updated changelog. 2019-02-13 11:47:52 +01:00
Jens Schauder
83ca6b4739 DATAJDBC-259 - Reading and writing to SQL array types.
Currently works for HsqlDb and Postgres, since the others do not support an array column type.

Original pull request: #113.
2019-02-06 14:30:10 +01:00
Jens Schauder
13cc4f6dd6 DATAJDBC-111 - Polishing.
Formatting.
Removed some redundant tests.
Some code simplifications.

Original pull request: #110.
2019-01-24 15:24:51 +01:00
Schlagi123
7a26385b5a DATAJDBC-111 - Add support for embeddables.
By annotating a reference with `Embedded` that reference will get stored in the same table as the owning entity.

Original pull request: #110.
2019-01-24 15:24:51 +01:00
Jens Schauder
0d23603efc DATAJDBC-285 - Polishing.
Original pull request: #108.
2019-01-16 16:33:23 +01:00
Bastian Wilhelm
4bff3f22b0 DATAJDBC-285 - Document usage of @Table and @Column.
Original pull request: #108.
2019-01-16 16:33:23 +01:00
Mark Paluch
e5be123d9d DATAJDBC-297 - Updated changelog. 2019-01-10 14:15:38 +01:00
Jens Schauder
44e164fda4 DATAJDBC-287 - Polishing.
Moved the converter into it's own enum demonstrating good practices.
Added `@ReadingConverter`.

Original pull request: #106.
2019-01-09 08:45:32 +01:00
Evgeni Dimitrov
29688c9729 DATAJDBC-287 - Document registration of custom converters.
Original pull request: #106.
2019-01-09 08:45:32 +01:00
Mark Paluch
4d0ada1e3f DATAJDBC-313 - Update copyright years to 2019. 2019-01-02 13:55:30 +01:00
Christoph Strobl
16367dd7a5 DATAJDBC-305 - Prepare 1.1 M1 (Moore). 2018-12-11 10:53:11 +01:00
Christoph Strobl
47dc7e1124 DATAJDBC-305 - Updated changelog. 2018-12-11 10:53:10 +01:00
Mark Paluch
161d77b375 DATAJDBC-306 - Simplify reference documentation setup. 2018-12-10 10:12:35 +01:00
Mark Paluch
705ed1216a DATAJDBC-283 - Updated changelog. 2018-11-27 14:54:10 +01:00
Mark Paluch
73da720258 DATAJDBC-277 - Updated changelog. 2018-10-29 14:30:36 +01:00
Mark Paluch
6a60c53602 DATAJDBC-272 - Split Spring Data JDBC project into modules. 2018-10-17 12:40:51 +02:00
Mark Paluch
44fbba42ee DATAJDBC-268 - Updated changelog. 2018-10-15 11:37:26 +02:00
Jens Schauder
0373a58978 DATAJDBC-263 - Polishing.
Improved formatting, added author tags and issue comments.
Changed "entity" to "aggregate" in test names to make it more precise.

Original pull request: #94.
2018-10-15 08:44:54 +02:00
Maciej Walkowiak
11d535e2c5 DATAJDBC-263 - Publish events for @Query annotated methods.
Original pull request: #94.
2018-10-15 08:44:54 +02:00
Jens Schauder
577d7643dd DATAJDBC-221 - Added AggregateReference for references across aggregates.
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.
2018-10-10 10:15:13 -05:00
Jens Schauder
c616e006cf DATAJDBC-125 - Added test to verify that with renamed columns references of identical type are possible. 2018-10-10 10:11:07 -05:00
Jens Schauder
a5e647cb17 DATAJDBC-125 - Polishing.
Added comments to denoting the relevant Jira issue on tests created for DATAJDBC-204.
2018-10-10 10:10:59 -05:00
Jens Schauder
6233858f9e DATAJDBC-246 - Configured Travis CI build for JDK 9-11.
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+.
2018-10-10 10:07:01 -05:00
Jens Schauder
3d67ad08ed DATAJDBC-262 - Update statements no longer set the id column. 2018-10-10 10:04:20 -05:00
Jens Schauder
0816f4182e DATAJDBC-266 - Entities referenced by 1:1 don't need an Id.
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.
2018-10-10 09:58:07 -05:00