Changed the implementation of ValidationErrors to be based on AbstractBeanPropertyBindingResult to consider the nesting implemented in superclasses and using a PersistentPropertyAccessor to lookup the property values.
ValidatingRepositoryEventListener now uses this implementation if a PersistentEntity can be obtained for the type under consideration, falling back to a DirectFieldBindingResult otherwise.
Until now, the controller handling a PUT request for an item resource defensively tried to set the identifier of the entity to update to guard against request payloads accidentally modifying the identifier of entities to be uploaded by using the raw identifier from the URI. Through the introduction of customized entity lookups this isn't necessarily the actual entity identifier anymore.
We now apply this defensive logic in the argument resolver for the incoming PersistentEntityResource where we have access to the object to update, can lookup the actual identifier directly and set it back after Jackson has applied the request body to the object to update.
Related tickets: DATAREST-724.
RepositoryPropertyReferenceController now uses a RepositoryInvoker instead of the ConversionService so that potentially applied customized entity lookups are considered during that lookup.
Extracted HttpHeadersPreparer to remove functionality and dependencies from the commons superclass of all Spring Data REST controllers in favor of a dedicated type.
Related tickets: DATAREST-724.
Upgraded to JSONPath 1.1.0 as 0.9 is not supported with Spring 4.2 anymore. Tweaked integration tests due to changed semantics and internals of JSONPath >= 1.0.
Extracted store specific tests into separate test modules to prevent classpath overlap between projects. Those tests are now executed in an "it" build profile to prevent the tests being packaged for distribution on release.
Use Map-based repositories and mapping contexts for test in the Core and WebMvc module.
Slightly changed the configuration API for lookup types on RepositoryRestConfiguration.
Related ticket: DATAREST-776.
Tweaked custom Jackson serialization to make sure nested entities are rendered as resources so that links to related resources can be collected on nested levels as well.
Extracted EmbeddedResourcesAssembler from PersistentEntityResourceAssembler so that embedded resources can also be build for nested entities. Extracted a ResourceProcessorInvoker from ResourceProcessorHandlerMethodReturnValueHandler to allow ResourceSupport instances created for nested entities get the ResourceProcessor instance registered for them invoked as well.
ProjectionDefinitionRegistrar now also allows the domain type of a repository being registered as excerpt, too.
Related tickets: DATAREST-776.
Added required solr.xml and moved core.properties to new location. Additionally registered a CloseHook to prevent SolrCore.close() failures.
Original pull request: #209.
We now configure a proper output directory for Querydsl generated test classes. Previously we used the folder that's automatically picked up by the main compilation step which breaks subsequent compile runs if they're not run with a previous clean.
Upgraded to Groovy 2.4.4. Polished sample domain types and repositories. Removed obsolete format registration in test cases for schema creation. Keep inlined null checks to make sure the IDE doesn't create unnecessary can-be-null warnings.
Original pull request: #206.
Groovy-based objects inherit from GroovyObject. This brings along attributes that Spring Data REST may try to parse when generating metadata like JSON Schema. Also verify ALPS is supported.
We now exclude those artificial properties from being exposed in the schema as well as causing issues.
Original pull request: #206.
ProjectionResourceContentSerializer.unwrappingSerializer(…) now returns a new unwrapping instance instead of mutating the current instance to prevent the source one from answering subsequent calls to isUnwrappingSerializer() with true.
This allows the source instance to be reused and produce reliable results on multiple serialization attempts.
Related tickets: DATAREST-716.
UriToEntityDeserializer now uses the RepositoryInvokerFactory to resolve entity instances directly to make sure potentially registered EntityLookup instances are considered for the lookup.
Tweaked the RepositoryEntityController to lookup the identifier of the entity to be deleted from the entity obtained rather than forwarding the given id directly. This makes sure we use the real entity identifier on calls to delete in case the one to be used in URIs is customized via an EntityLookup.