openjpa-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Pinaki Poddar (JIRA)" <j...@apache.org>
Subject [jira] Resolved: (OPENJPA-217) query param value issue in select query
Date Tue, 20 Oct 2009 05:38:59 GMT

     [ https://issues.apache.org/jira/browse/OPENJPA-217?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]

Pinaki Poddar resolved OPENJPA-217.
-----------------------------------

    Resolution: Won't Fix

Not really a bug.

> query param value issue in select query
> ---------------------------------------
>
>                 Key: OPENJPA-217
>                 URL: https://issues.apache.org/jira/browse/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"/>        
>  </basic>
> 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) it works.
> 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.


Mime
View raw message