-
Notifications
You must be signed in to change notification settings - Fork 7
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Tuple entity is taken by the type of the repository, and not by the type of return of the function #32
Labels
enhancement
New feature or request
Comments
5 tasks
Also the following scenario must be fixed. function test_custom(a, b)
return tostring(a + b)
end Repository method definition @Query(function = "test_custom")
String testCustom(Integer a, Integer b); Repository usage @Test
public void testCustomMethod() {
String r = bookRepository.testCustom(1,2);
assertEquals("3", r);
} Now it throws the following error:
|
The workaround, for now, is to use the wrapper public class StringWrapper {
private String string;
} public interface StringRepository extends TarantoolRepository<StringWrapper, Long> {
@Query(function = "custom_function")
StringWrapper customFunction();
} @Test
public void test() {
String s = stringRepository.customFunction();
assertEquals("hello", s);
} function custom_function()
return {string = "hello"}
end |
Closes by #48 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
The text was updated successfully, but these errors were encountered: