openjpa-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "sharath.h (JIRA)" <>
Subject [jira] Created: (OPENJPA-217) query param value issue in select query
Date Fri, 13 Apr 2007 23:15:16 GMT
query param value issue in select query

                 Key: OPENJPA-217
             Project: OpenJPA
          Issue Type: Bug
          Components: jpa, query
    Affects Versions: 0.9.6
            Reporter: sharath.h
            Priority: Minor

Consider a scenario where we have an entity class as shown below:
class A
 long id;
String str1;
String str2;
Say for str2 attribute there will be length constraint something like 
<basic name="str2" >
          <column name="col2"  length="4"/>        

Now say i have a jpql select query as shown below :
Query q = em.createQuery("select t from A t where t.str2:paramvalue");
q.setParameter("paramvalue", "23");

The above query return empty result set even though the records are present in table.
But when i set the value from "23" to "23  " (i.e. with trailing 2 spaces).

Can the padding of additional empty spaces be taken care default by jpa itself for select
kind of queries.

This message is automatically generated by JIRA.
You can reply to this email to add a comment to the issue online.

View raw message