tarantool / cartridge-springdata

Spring Data Tarantool

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Throw exception in callForTuple with void returnedType

ArtDu opened this issue · comments

Right now it's not working as expected. Later there are checks for void, but it's better to check here.

/**
* Execute the query
*
* @param parameters annotated method parameters
* @return query result
*/
public Object execute(final Object[] parameters) {
final Class<?> returnedType = queryMethod.getReturnedObjectType();
String spaceName = operations.getMappingContext().getRequiredPersistentEntity(returnedType).getSpaceName();
if (queryMethod.isCollectionQuery()) {
return operations.callForTupleList(queryMethod.getQueryFunctionName(), parameters, spaceName, returnedType);
} else {
return operations.callForTuple(queryMethod.getQueryFunctionName(), parameters, spaceName, returnedType);
}
}
}

image