Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
DATACMNS-34 - Improved algorithm to lookup preferred constructor.
Algorithm is now was follows: 1. If there's no explicit constructor use the default constructor. 2. If there's a single explicit constructor, use this one. 3. If there's multiple explicit constructors and one has been annotated with @PersistenceConstructor use the annotated one. 4. If there's multiple explicit constructors and none annotated use the no-arg one or throw an exception to resolve the ambiguity. Test cases for that algorithm are located in PreferredConstructorDiscovererUnitTests. Refactored PreferredConstructor and Parameter classes a little to make them immutable value objects. Introduced ability to lookup parameter TypeInformation for constructors on TypeInformation interface. Extended generics in mapping subsystem to allow defining a concrete subtype of PersistentProperty as well. Removed some generics related compiler warnings as well.
- Loading branch information
Showing
32 changed files
with
665 additions
and
405 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
57 changes: 0 additions & 57 deletions
57
...data-commons-core/src/main/java/org/springframework/data/mapping/BasicMappingContext.java
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.