openjpa-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Rick Curtis (JIRA)" <>
Subject [jira] [Commented] (OPENJPA-2280) MappingTool ignores column precision / scale for some databases
Date Wed, 31 Oct 2012 19:46:11 GMT


Rick Curtis commented on OPENJPA-2280:

After digging into this issue, it is getting to be much more complicated that what I initially
thought. Changing DBDictionary.numericTypeName from DOUBLE to DECIMAL did have the intended
effect (honoring precision, scale when creating tables), but it also had a number of unintended
runtime consequences.

* First, TestTypesafeCriteria.testBigDecimalConversion was failing because we were trying
to CAST an INT column (in a SQL statement) up to a BigDecimal compatible column (so we could
execute a math function), but it was blowing up because the INT was larger than a DECIMAL(5,0).
To get around that problem I set DBDictionary.(requiresCastForComparisons && requiresCastForMathFunctions)
to false to avoid generating the cast and the the test would pass.

* Next, org.apache.openjpa.persistence.criteria.TestTypeSafeCondExpression.testArithmFunc3
and org.apache.openjpa.persistence.criteria.TestTypesafeCriteria.testFunctionWithTwoArgument
were failing (on DB2 9.5 but not 10.1) and I didn't take the time to dive into these issues.

The net of it is that this isn't a trivial change to get right and at the current point in
time, I don't have time to resolve this issue properly. I'm going to back out all of my changes
and put it back into the open state. Hopefully someone with some more time will be able to
look at this in the near future.
> MappingTool ignores column precision / scale for some databases
> ---------------------------------------------------------------
>                 Key: OPENJPA-2280
>                 URL:
>             Project: OpenJPA
>          Issue Type: Bug
>          Components: tooling
>    Affects Versions: 1.2.3, 2.3.0, 2.2.1
>            Reporter: Rick Curtis
>            Assignee: Rick Curtis
>             Fix For: 2.3.0
> This JIRA is the same issue as reported by OPENJPA-1224.

This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see:

View raw message