DATAREST-724 - Fixed invocation of DELETE on item resource with entity lookup present.
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.
This commit is contained in:
@@ -126,7 +126,6 @@ public class UnwrappingRepositoryInvokerFactory implements RepositoryInvokerFact
|
||||
* (non-Javadoc)
|
||||
* @see org.springframework.data.repository.support.RepositoryInvoker#invokeFindOne(java.io.Serializable)
|
||||
*/
|
||||
|
||||
public <T> T invokeFindOne(Serializable id) {
|
||||
return postProcess(lookup != null ? lookup.lookupEntity(id) : delegate.invokeFindOne(id));
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user