hello,
In my application i want to implement a wild card search. for that i
planned to use LIKE key word with ejb-ql. i have used the follwoing query
(as instructed in the forum ) i have overload the ejbql query with
jboss-query.
following shows the queries i defined
* @ejb.finder signature = "java.util.Collection
findByConsigneeStatus(java.lang.String consigneeRef,java.lang.String
orderStatus)"
* query = "SELECT OBJECT(o) FROM Order o WHERE o.consigneeReference LIKE
'?1%' AND o.workflowStatus = ?2"
*
*@jboss.query signature = "java.util.Collection
findByConsigneeStatus(java.lang.String consigneeRef,java.lang.String
orderStatus)"
* query = "SELECT OBJECT(o) FROM Order o WHERE o.consigneeReference LIKE
?1 AND o.workflowStatus = ?2"
*
when i run the xdoclet it doesnot give any errors. but when i deploy the
application i get following error.
"Order" at line 1, column 23.
Was expecting one of:
"IN" ...
<ABSTRACT_SCHEMA> ...
)]
could pls tell me what do i need to do to over com this problem.
is there anyother where i can implement a wild card search
i have checked the table names. there are similar as above. i am using
jboss3.2.3 with mysql as the database.
thanks in advance.
PhilEsch - 22 Aug 2004 14:24 GMT
>hello,
>
[quoted text clipped - 35 lines]
>
>thanks in advance.
First, I the EQL syntax should be "Order AS o" (not "Order o").
Second, I don't believe you want to use the % wildcard, I think that the
processor handles this behind the scenes.
And you may or may not have an issue using a table name "Order", as that is
also a reserved word.
Let us know how you do.
... Phil