Friday, October 15, 2010

Number precision and conversion in query criteria

There is a strange behavior of number type fields in af:query.
I created a simple Query page from HR schema for Employees (Entity and View) with some typical criteria.
When a user type a value in a String criterion field then he is not allowed to type more characters than the precision of the field.(i.e. 25 for LastName, email)
The same apply for the LOV field (Department 4 digits)
Yet Number fields have strange behavior.No mater the precision of the Number field you can type as many digits you want.
Yet if you type up to 21 then the last 4 digits are converted to 0!!?
If you type more than 21 digits it is converted to the first digits with other 3 as decimals!?
If you type number with more than 3 decimals it is rounded to 3 decimals.

These restrictions make large numbers not usable for query criteria.
Is this a bug to be fixed?
Test case:

No comments:

Post a Comment