openjpa-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Patrick Linskey (JIRA)" <>
Subject [jira] Commented: (OPENJPA-221) DerbyDictionary doesn't describe a working mapping for char fields.
Date Wed, 18 Apr 2007 17:18:15 GMT


Patrick Linskey commented on OPENJPA-221:

It's not surprising that the OpenJPA tests storeCharsAsNumbers to be true.

I was referring to your test environment. Rather than changing the default behavior of the
DerbyDictionary in code, it seems more appropriate to use the built-in configuration option
to toggle it for your application.

It sounds like you're reluctant to do this since you don't have easy access to modify the
persistence.xml files. Happily, if you drop a file conforming to the persistence.xml schema
into META-INF/openjpa.xml, OpenJPA will load the settings in the properties in the first PU
in that file as defaults for all PUs.

What happens if you put the DBDictionary stanza that I mentioned earlier into a META-INF/openjpa.xml

> DerbyDictionary doesn't describe a working mapping for char fields.
> -------------------------------------------------------------------
>                 Key: OPENJPA-221
>                 URL:
>             Project: OpenJPA
>          Issue Type: Bug
>          Components: sql
>    Affects Versions: 0.9.7
>            Reporter: David Jencks
>         Attachments: OPENJPA-221.patch
> If a class has a char field mapped to CHAR or CHAR(1) in a derby database, the derby
dictionary sets up a mapping to an integer column which doesn't work.  openjpa tries to store
e.g. the string "97" for the char 'a' which results in a truncation error.

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

View raw message