Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
[eclipselink-users] NumberFormat exception when searching for numeric fields

I have got a webapplication that contains an AJAX-driven autocomplete field
that is mapped to a numeric field of type long.
As soon as the user enters at least two characters an AJAX-request is sent
to the server that in turn should query the database in order to fetch a
list of possible items.

The query is very simple:

select a.id from Material a where a.id like '12%'

But that query doesn't work! I get an EclipseLink conversion exception that
is

Caused by: java.lang.NumberFormatException: For input string: "12%"

Please tell me how to use wildcards when searching for numeric fields! Thank
you very much.


-- 
View this message in context: http://old.nabble.com/NumberFormat-exception-when-searching-for-numeric-fields-tp31301734p31301734.html
Sent from the EclipseLink - Users mailing list archive at Nabble.com.



Back to the top