I looked back through my emails from when I backed this change out and can't figure out which test I regressed. The reason that I backed the change out rather than fix the problem is because we were in the middle of trying to cut a release. I'll open a new JIRA soon here and just recommit the change to trunk for Derby / DB2 and fix the bug(s) when it rolls in.
> Is there any reason to ignore (precision, scale) of numeric on postgres? If I made the change for postgres, is this something you would be able to test? Thanks, Rick On Fri, Oct 12, 2012 at 9:08 PM, Yaocl <chunlin...@gmail.com> wrote: > Hi > > I use postgres in production environment, when using MappingTool to > generate DDL, I found openjpa map BigDecimal to NUMERIC but ignored > precision and scale specified in @Column. > When use openjpa with mysql. It can generate NUMERIC(precision, > scale). Finally I found because DBDictionary added NUMERIC into > fixedSizeTypeNameSet. So postgres not generate (precision, scale). > MySQLDictionary and SybaseDictionary removed NUMERIC from > fixedSizeTypeNameSet and these two database support (precision, > scale). > > I haven't view all Dictionary class. Is there any reason to ignore > (precision, scale) of numeric on postgres? I known the postgres > database support NUMERIC(precision, scale) data type. > > When use openjpa with DB2 and Derby. It use DOUBLE for BigDecimal, > Because numericTypeName defined to DOUBLE in AbstractDB2Dictionary. > <https://issues.apache.org/jira/browse/OPENJPA-1224> tried to fix it, > but finally > backed out changes because a test regression. DOUBLE cannot represent > decimal fractions exactly. Maybe we should consider to change it to > NUMERIC. > > > Regards, > YaoCL > -- *Rick Curtis*