Message :-
org.josql.QueryExecutionException: Unable to get value for LHS of expression: myGet(:_currobj,10.0)) = toDate('01-02-2005')
This is my Query :- q.parse("SELECT * FROM java.lang.Object WHERE myGet(:_currobj,10)) = to_date ('01-02-2005') ");
this is my myGet method :-
public Object myGet( Object obj, Double exp ) throws QueryExecutionException { iobj_value = (Object[])obj ; return ((Object[])obj )[ exp.intValue() ]; }
basically my arraylist contain object array and element number 10 are Date. it works well in order by but not where clause. Any ideas ? :-(
"SELECT * FROM java.lang.Object ORDER BY myGet(:_currobj, 10) desc " <- OK
Can you post the full exception trace that you are getting. That will give me some idea as to why it fails.
Thanks,
Gary
BTW, at first glance (and this might be a cut-n-paste error ;) you appear to have an extra ) in the statement, i.e. myGet(:_currobj,10.0))
This should have caused a parse exception though rather than an execution exception.
Exception :-
org.josql.QueryExecutionException: Unable to get value for RHS of expression: myGet(:_currobj,10.0) = to_date('01-02-2005')
sorry about the extra ")" I though that was my code :-P Anyway, that all i got in my console.
I really running out of ideas :-(
Anyway, thanks for your quick reply. :-D
Sorry...
I had found my problem... myGet Object must be in public. Private will caused exception trows.
Thanks and sorry :-P
Log in to post a comment.
Message :-
org.josql.QueryExecutionException: Unable to get value for LHS of expression: myGet(:_currobj,10.0)) = toDate('01-02-2005')
This is my Query :-
q.parse("SELECT * FROM java.lang.Object WHERE myGet(:_currobj,10)) = to_date ('01-02-2005') ");
this is my myGet method :-
public Object myGet( Object obj, Double exp ) throws QueryExecutionException {
iobj_value = (Object[])obj ;
return ((Object[])obj )[ exp.intValue() ];
}
basically my arraylist contain object array and element number 10 are Date.
it works well in order by but not where clause. Any ideas ? :-(
"SELECT * FROM java.lang.Object ORDER BY myGet(:_currobj, 10) desc " <- OK
Can you post the full exception trace that you are getting. That will give me some idea as to why it fails.
Thanks,
Gary
BTW, at first glance (and this might be a cut-n-paste error ;) you appear to have an extra ) in the statement, i.e. myGet(:_currobj,10.0))
This should have caused a parse exception though rather than an execution exception.
Gary
Exception :-
org.josql.QueryExecutionException: Unable to get value for RHS of expression: myGet(:_currobj,10.0) = to_date('01-02-2005')
sorry about the extra ")" I though that was my code :-P
Anyway, that all i got in my console.
I really running out of ideas :-(
Anyway, thanks for your quick reply. :-D
Sorry...
I had found my problem... myGet Object must be in public. Private will caused exception trows.
Thanks and sorry :-P