query with multiple parameters [message #1737855] |
Wed, 13 July 2016 14:28 |
Viktoria Fink Messages: 12 Registered: May 2016 |
Junior Member |
|
|
Hi,
I try to pass two or more parameters to a java class. Every time I do that I get an error.
Invalid result for expression self.invoke('generator.extension.Extension', 'test(java.lang.Integer, java.lang.Integer)', Sequence {id, str}) at line 30 in Module generate for query test(Integer,String).
The query to this:
[query public test(id : Integer, str : String) : String = invoke('generator.extension.Extension', 'test(java.lang.Integer, java.lang.Integer)', Sequence{id, str}) /]
It works with one parameter. I wonder if it's not designted to pass more than one or I'm doing something wrong.
EDIT:
Ok, I got the error now. It works if I don't mess up the data types. I'm good at making things chaotic.
Viktoria
[Updated on: Wed, 13 July 2016 15:02] Report message to a moderator
|
|
|
Re: query with multiple parameters [message #1737859 is a reply to message #1737855] |
Wed, 13 July 2016 14:40 |
Ed Willink Messages: 7680 Registered: July 2009 |
Senior Member |
|
|
Hi
If you add an extra argument/parameter you must:
a) add an extra Parameter to the called Java operation
b) add an extra parameter to the invoke type signature definition
c) add an extra argument to the invoke Sequence of arguments
d) add an extra parameter to the wrapping query
e) add an extra argument to the query invocation
Miss any one and you have an obscure error message, possibly only at
run-time.
IIRC I raised a Bugzilla for a validation of this long time ago.
Regards
Ed Willink
On 13/07/2016 15:28, Viktoria Fink wrote:
> Hi,
>
> I try to pass two or more parameters to a java class. Every time I do
> that I get an error.
>
>
> Invalid result for expression
> self.invoke('generator.extension.Extension', 'test(java.lang.Integer,
> java.lang.Integer)', Sequence {id, str}) at line 30 in Module generate
> for query test(Integer,String).
>
>
> The query to this:
>
> [query public test(id : Integer, str : String) : String =
> invoke('generator.extension.Extension', 'test(java.lang.Integer,
> java.lang.Integer)', Sequence{id, str}) /]
>
> It works with one parameter. I wonder if it's not designted to pass
> more than one or I'm doing something wrong.
>
> Viktoria
|
|
|
Powered by
FUDForum. Page generated in 0.03908 seconds