You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@openjpa.apache.org by "Patrick Linskey (JIRA)" <ji...@apache.org> on 2007/09/07 00:31:29 UTC
[jira] Updated: (OPENJPA-354) DB2 casts might not incorporate
VARCHAR lengths often enough
[ https://issues.apache.org/jira/browse/OPENJPA-354?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Patrick Linskey updated OPENJPA-354:
------------------------------------
Attachment: OPENJPA-354.patch
> DB2 casts might not incorporate VARCHAR lengths often enough
> ------------------------------------------------------------
>
> Key: OPENJPA-354
> URL: https://issues.apache.org/jira/browse/OPENJPA-354
> Project: OpenJPA
> Issue Type: Bug
> Affects Versions: 0.9.0, 0.9.6, 0.9.7, 1.0.0
> Reporter: Patrick Linskey
> Attachments: OPENJPA-354.patch
>
>
> Based on code inspection, it looks like OpenJPA might not be including VARCHAR lengths often enough.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
Re: [jira] Updated: (OPENJPA-354) DB2 casts might not incorporate VARCHAR lengths often enough
Posted by Patrick Linskey <pl...@gmail.com>.
Hi,
> The code may miss something outside these functions. Please send your test
> case to me so I can understand the missing. Your change looks good.
I don't have a test case; while working on some unrelated changes to
DB2Dictionary, I noticed that we weren't specifying a length in a
number of places.
Out of curiosity, how did we choose 1000 for the hard-coded value? In
particular, it seems like it'd be more appropriate to use the variable
that I used, so that people could customize this if need be.
-Patrick
On 9/7/07, Teresa Kan <tc...@gmail.com> wrote:
> Patrick,
> The VARCHAR(1000) was added in the AbstractDB2Dictionary. See the following
> constants:
>
> toUpperCaseFunction = "UPPER(CAST({0} AS VARCHAR(1000)))";
>
> toLowerCaseFunction = "LOWER(CAST({0} AS VARCHAR(1000)))";
>
> stringLengthFunction = "LENGTH({0})";
>
> concatenateFunction = "(CAST({0} AS VARCHAR(1000)))||"
>
> + "(CAST({1} AS VARCHAR(1000)))";
>
> The code may miss something outside these functions. Please send your test
> case to me so I can understand the missing. Your change looks good.
>
> Thanks,
>
> Teresa
>
>
>
> On 9/6/07, Patrick Linskey (JIRA) <ji...@apache.org> wrote:
> >
> >
> > [
> > https://issues.apache.org/jira/browse/OPENJPA-354?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel]
> >
> > Patrick Linskey updated OPENJPA-354:
> > ------------------------------------
> >
> > Attachment: OPENJPA-354.patch
> >
> > > DB2 casts might not incorporate VARCHAR lengths often enough
> > > ------------------------------------------------------------
> > >
> > > Key: OPENJPA-354
> > > URL: https://issues.apache.org/jira/browse/OPENJPA-354
> > > Project: OpenJPA
> > > Issue Type: Bug
> > > Affects Versions: 0.9.0, 0.9.6, 0.9.7, 1.0.0
> > > Reporter: Patrick Linskey
> > > Attachments: OPENJPA-354.patch
> > >
> > >
> > > Based on code inspection, it looks like OpenJPA might not be including
> > VARCHAR lengths often enough.
> >
> > --
> > This message is automatically generated by JIRA.
> > -
> > You can reply to this email to add a comment to the issue online.
> >
> >
>
--
Patrick Linskey
202 669 5907
Re: [jira] Updated: (OPENJPA-354) DB2 casts might not incorporate VARCHAR lengths often enough
Posted by Teresa Kan <tc...@gmail.com>.
Patrick,
The VARCHAR(1000) was added in the AbstractDB2Dictionary. See the following
constants:
toUpperCaseFunction = "UPPER(CAST({0} AS VARCHAR(1000)))";
toLowerCaseFunction = "LOWER(CAST({0} AS VARCHAR(1000)))";
stringLengthFunction = "LENGTH({0})";
concatenateFunction = "(CAST({0} AS VARCHAR(1000)))||"
+ "(CAST({1} AS VARCHAR(1000)))";
The code may miss something outside these functions. Please send your test
case to me so I can understand the missing. Your change looks good.
Thanks,
Teresa
On 9/6/07, Patrick Linskey (JIRA) <ji...@apache.org> wrote:
>
>
> [
> https://issues.apache.org/jira/browse/OPENJPA-354?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel]
>
> Patrick Linskey updated OPENJPA-354:
> ------------------------------------
>
> Attachment: OPENJPA-354.patch
>
> > DB2 casts might not incorporate VARCHAR lengths often enough
> > ------------------------------------------------------------
> >
> > Key: OPENJPA-354
> > URL: https://issues.apache.org/jira/browse/OPENJPA-354
> > Project: OpenJPA
> > Issue Type: Bug
> > Affects Versions: 0.9.0, 0.9.6, 0.9.7, 1.0.0
> > Reporter: Patrick Linskey
> > Attachments: OPENJPA-354.patch
> >
> >
> > Based on code inspection, it looks like OpenJPA might not be including
> VARCHAR lengths often enough.
>
> --
> This message is automatically generated by JIRA.
> -
> You can reply to this email to add a comment to the issue online.
>
>