Red Hat Bugzilla – Bug 534284
make hibernate.jsp work for non-string bind parameters
Last modified: 2010-03-29 15:34:56 EDT
seems when there is a parameterized query, it only works for string types. it auto-renders input fields for the params, but bombed when the parameters mapped to integers.
This bug was previously known as http://jira.rhq-project.org/browse/RHQ-1095
mass add of key word FutureFeature to help track
committed to master -- 195e7a1dd15ed80a86e8f6bcc1e2787d511de3a9
* support binding to boolean as well as all numeric basic types;
* support binding to enums (user can enter ordinal or name [case-insensitively] of enum);
* support binding to entities (user can enter id / primary key);
* modify label for input field next to each query parameter to give a brief explanation of how it's supported;
hibernate.jsp now supports all of the following queries:
SELECT res FROM Resource res WHERE res.name IN ( :item ) // string
SELECT res FROM Resource res WHERE res.id IN ( :item ) // integer
SELECT res FROM Resource res WHERE res.ctime IN ( :item ) // long
SELECT res FROM Resource res WHERE res.connected IN ( :item ) // boolean
SELECT res FROM Resource res WHERE res.inventoryStatus IN ( :item ) // enum
SELECT res FROM Resource res WHERE res IN ( :item ) // entity type
Needs Repro steps.
Mass-move to ON_QA
This can be considered a development debugging / testing page, and doesn't need to be tested for customer release. However, my last comment basically are the reproduction steps. The page "/admin/test/hibernate.jsp" now supports binding to all of the previously mentioned parameter types - string, integer, long, boolean, enum, and entities. If you enter those queries, you'll see that the page doesn't blow up, and will give an input box for you to enter the value of the ":input" parameter. You should be able to enter a string version of those parameters and the query will return results (again, instead of blowing up). For all non-obvious bind parameter types, the UI now gives instructions for how to enter a value it will accept.