Bug 534284 - (RHQ-1095) make hibernate.jsp work for non-string bind parameters
make hibernate.jsp work for non-string bind parameters
Status: CLOSED NOTABUG
Product: RHQ Project
Classification: Other
Component: Core UI (Show other bugs)
unspecified
All All
low Severity medium (vote)
: ---
: ---
Assigned To: Joseph Marques
http://jira.rhq-project.org/browse/RH...
: FutureFeature, Improvement
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2008-11-09 16:47 EST by Joseph Marques
Modified: 2010-03-29 15:34 EDT (History)
1 user (show)

See Also:
Fixed In Version:
Doc Type: Enhancement
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2010-03-29 15:34:56 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:


Attachments (Terms of Use)

  None (edit)
Description Joseph Marques 2008-11-09 16:47:00 EST
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.  
Comment 1 Red Hat Bugzilla 2009-11-10 15:23:50 EST
This bug was previously known as http://jira.rhq-project.org/browse/RHQ-1095
Comment 2 wes hayutin 2010-02-16 12:10:20 EST
mass add of key word FutureFeature to help track
Comment 3 Joseph Marques 2010-02-19 02:42:35 EST
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
Comment 4 Corey Welton 2010-03-29 13:31:31 EDT
Needs Repro steps.
Comment 5 Corey Welton 2010-03-29 13:32:27 EDT
Mass-move to ON_QA
Comment 6 Joseph Marques 2010-03-29 13:40:40 EDT
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.
Comment 7 Corey Welton 2010-03-29 15:34:56 EDT
QA Closing.

Note You need to log in before you can comment on or make changes to this bug.