hello,
you are right. it works perfectly now. i wish jboss had given me an error message, it would have been easier ...
thank you very much, paul.
Harkness, David wrote:
Paul Guermonprez penned
i try to use JBoss dynamic query, with xdoclet, the deployment is ok, but the result is empty, no exception generated. ... the testing QL is :
select Object(o) from Employee o where o.firstName like '%?1%'
You cannot include %'s directly with regular EJB-QL, so I suspect the same is true with JBoss-QL. The reason is that the QL engine replaces ?1 -- in the case of a String param -- with "'<value>'" (note the single quotes). So you end up with the query
... o.firstName like '%'Paul'%'
or something equally broken. Why that doesn't give you an error, I do not know. Instead, when using like queries, you must add the %'s to the parameter and remove the single-quotes from the query. For example, pass in "%Paul%" as the parameter and
select Object(o) from Employee o where o.firstName like ?1
as the query.
------------------------------------------------------- SF.Net email is sponsored by Shop4tech.com-Lowest price on Blank Media 100pk Sonic DVD-R 4x for only $29 -100pk Sonic DVD+R for only $33 Save 50% off Retail on Ink & Toner - Free Shipping and Free Gift. http://www.shop4tech.com/z/Inkjet_Cartridges/9_108_r285 _______________________________________________ xdoclet-user mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/xdoclet-user