openjpa-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Marc Boudreau <Marc.Boudr...@ca.ibm.com>
Subject Multibyte characters on SQL Server and Sybase
Date Fri, 08 Jan 2010 15:53:19 GMT


Currently, OpenJPA maps String fields to VARCHAR on SQLServer and Sybase.
There doesn't appear to be a way to cause a String field to be mapped to
NVARCHAR other than by using the @Column annotation and settings its
columnDefinition to "NVARCHAR".  At the same time, blindly using NVARCHAR
for all String fields is too costly in terms of storage space on the
database.  It ends up limiting the maximum size of the column (less
characters can fit because more bytes are used to store them).

Unfortunately, the applications we write are required to be database
neutral because we support multiple vendors.

I'd like to start a discussion on this matter.  Here are a couple of points
to lead us off...
   What's the severity of this missing functionality?
   Could an OpenJPA specific annotation be introduced to allow the mapping
   tool to use NVARCHAR instead of VARCHAR?.


Marc Boudreau
Software Developer
IBM Cognos Content Manager
marc.boudreau@ca.ibm.com
Phone: 613-356-6412
Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message