Commit Graph

366 Commits

Author SHA1 Message Date
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
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
Mark Paluch
76be2791fc DATAJDBC-250 - Prepare 1.0 GA (Lovelace). 2018-09-21 07:07:51 -04:00
Mark Paluch
70ba5850d8 DATAJDBC-250 - Updated changelog. 2018-09-21 07:07:50 -04:00
Mark Paluch
bf81c728b2 DATAJDBC-267 - Polishing.
Add author tags. Extend Javadoc.

Original pull request: #89.
2018-09-21 06:44:00 -04:00
Christoph Strobl
234a17d4c2 DATAJDBC-267 - Favor JdbcCustomConversions over CustomConversions in return type.
Original pull request: #89.
2018-09-21 06:37:43 -04:00
Michael J. Simons
be7c04cfed DATAJDBC-267 - Explicitly use the own custom conversions bean.
Original pull request: #89.
2018-09-21 06:37:38 -04:00
Jens Schauder
84de41a87d DATAJDBC-264 - Polishing.
Added a test.
Added an author tag.
Minor formatting.

Original pull request: #88.
2018-09-18 15:35:52 +02:00
Yoichi Imai
8434f6e3dd DATAJDBC-264 - Fix insert statement for empty parameter list.
When an entity consists only of it's id column, the value list contained a single `:`.
This commit fixes this.

Original pull request: #88.
2018-09-18 15:35:32 +02:00
Jens Schauder
08ee846e71 DATAJDBC-218 - The Column annotation affects the back reference too.
Also:
Added documentation for the new behavior.
Made the value of the column annotation optional by providing a default.

Original pull request: #83.
2018-09-18 15:25:55 +02:00
Jens Schauder
335a7cbe65 DATAJDBC-218 - Polishing.
Added line breaks for better readability.
Added braces to if/else statements.
Used StringUtils instead of .equals("").

Original pull request: #83.
2018-09-18 15:05:36 +02:00
Florian Lüdiger
0a86f3a43b DATAJDBC-218 - Add support for key column in @Column annotation.
Original pull request: #83.
2018-09-18 15:05:36 +02:00
Mark Paluch
1c15215735 DATAJDBC-265 - Include documentation about Object Mapping Fundamentals.
Related ticket: DATACMNS-1374.
2018-09-18 13:30:42 +02:00
Florian Lüdiger
ba5ce90374 DATAJDBC-260 - Fix links in the reference documentation.
Original pull request: #87.
2018-09-12 07:41:24 +02:00
Oliver Gierke
3cbe2935ba DATAJDBC-252 - Make sure SimpleJdbcRepository.save(…) returns saved instance.
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.
2018-08-21 12:03:38 +02:00
Oliver Gierke
84379b28e9 DATAJDBC-252 - Polishing.
Original pull request: #86.
2018-08-21 11:04:26 +02:00
Jens Schauder
2a55aeb2b8 DATAJDBC-252 - Optimize population of (immutable) entities to be created.
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.
2018-08-21 11:04:23 +02:00
Jens Schauder
63b9754180 DATAJDBC-251 - Polishing.
Removed superfluous whitespace.

Original pull request: #85.
2018-08-20 22:30:08 +02:00
Jens Schauder
55c901b43b DATAJDBC-251 - Back-reference for dependent entity gets properly set.
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.
2018-08-20 22:26:49 +02:00
Oliver Gierke
e680a2764e DATAJDBC-245 - Prepare 1.0 RC2 (Lovelace). 2018-08-20 10:39:44 +02:00
Oliver Gierke
6c6d37af2d DATAJDBC-245 - Updated changelog. 2018-08-20 10:39:43 +02:00
Jens Schauder
e398db544c DATAJDBC-241 - Support for immutable entities.
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.
2018-08-20 09:42:22 +02:00
Mark Paluch
eb69f4206c DATAJDBC-242 - Polishing.
Slight rewording of individual parts. Include namespace/populator/return type includes. Use spring-framework-docs variable where possible.

Original pull request: #81.
2018-08-02 09:56:20 +02:00
Jens Schauder
2642d1be8f DATAJDBC-242 - Updated documentation.
Introduced variable for linking to JavaDoc.
Used the `revnumber` in there in order to link to the proper version of the JavaDoc.
Changed package and class names matching the changes of DATAJDBC-226.
Fixed some typos.

Original pull request: #81.
2018-08-02 09:56:14 +02:00
Jens Schauder
4c179a93ec DATAJDBC-229 - Added UUID.class as simple type.
Also made RelationalMappingContext actually use the JdbcSimpleTypes.

In order for this to work the database needs to be able to handle parameters of type UUID and store them either as such or internally convert them.
Currently no conversion by Spring Data JDBC happens.

Original pull request: #76.
2018-07-27 14:37:45 +02:00
Mark Paluch
264235703e DATAJDBC-215 - Prepare 1.0 RC1 (Lovelace). 2018-07-26 12:04:31 +02:00
Mark Paluch
7ab5d3f32d DATAJDBC-215 - Updated changelog. 2018-07-26 12:04:29 +02:00