persistence@glassfish.java.net

Re: String Persistence Strategies

From: James Sutherland <jamesssss_at_yahoo.com>
Date: Tue, 2 Oct 2007 06:50:20 -0700 (PDT)

There is no default, but you can set the size for each column on the @Column
annotation or <column> element (or perhaps the column that you need to be
bigger).

However table creation is not part of the JPA specification (although many
implementations support this), so if you are relying on JPA to create your
tables you are already provider dependent.

---
http://wiki.eclipse.org/User:James.sutherland.oracle.com James Sutherland 
Shelley wrote:
> 
> Is there any provider-independent method to modify the default Column
> length [1] for String attributes (preferably in the ORM xml mapping file)?
> 
> [1]
> http://java.sun.com/javaee/5/docs/api/javax/persistence/Column.html#length()
> 
> 
> James Sutherland wrote:
>> 
>> You can customize the defaults through making your own TopLink
>> DatabasePlatform class (oracle.toplink.essentials.platform.database). 
>> Subclass your existing database platform class and define the
>> buildFieldTypes() method to change the default size.
>> 
>> ---
>>  http://wiki.java.net/bin/view/People/JamesSutherland James Sutherland 
>> 
>> 
> 
> 
-- 
View this message in context: http://www.nabble.com/String-Persistence-Strategies-tf4387515.html#a12999251
Sent from the java.net - glassfish persistence mailing list archive at Nabble.com.