Fixed a bug where complex query method parameters that aren't managed by repositories were causing the parameter processing to short-circuit to a 404 error. Replaced that method call with a different one that simple returns a boolean if a type is managed by a repository so the if/else chain can continue on to the ConversionService.

This commit is contained in:
Jon Brisbin
2012-07-31 09:22:36 -05:00
parent b681844258
commit bf9c719950
2 changed files with 32 additions and 2 deletions

View File

@@ -537,11 +537,11 @@ public class RepositoryRestController
continue;
}
RepositoryMetadata paramRepoMeta;
if(String.class.isAssignableFrom(paramTypes[i])) {
// Param type is a String
paramVals[i] = queryVal;
} else if(null != (paramRepoMeta = repositoryMetadataFor(paramTypes[i]))) {
} else if(hasRepositoryMetadataFor(paramTypes[i])) {
RepositoryMetadata paramRepoMeta = repositoryMetadataFor(paramTypes[i]);
// Complex parameter is a managed type
Serializable id = stringToSerializable(queryVal,
(Class<Serializable>)paramRepoMeta.entityMetadata()