Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [eclipselink-users] Issue with generated DDL

Hi Peter,

The name for the join table itself isn't too long in this case. It's the column names on that table and their associated usage in the fk constraints that are too long.  Are those column names also governed by the JPA spec? 

-Noah


On May 30, 2012, at 5:00 PM, Peter Krogh wrote:

> I believe that there is code in place that does indeed take database size limitations into account when generating the fk constraint names, so i am surprised to see that this is an issue   
> 
> The name that is chosen for the relation table (I believe) is governed by the Jpa spec.  
> 
> This message was composed by Peter's thumb. 
> 
> On 2012-05-30, at 4:49 PM, Noah White <emailnbw@xxxxxxxxx> wrote:
> 
>> Hi folks,
>> 
>> I am using Eclipselink 2.3.2v20111125-r10461 bundled with Glassfish 3.1.2. In my persistence.xml I set among other properties:
>> 
>> <property name="eclipselink.target-database" value="Oracle"/>
>> <property name="eclipselink.jdbc.native-sql" value="true"/>
>> 
>> One of my Entity classes has a @OneToMany relationship. The property name is kind of long. If I allow Eclipselink to perform auto DDL generation it tries to create a join table with row names and constraint names which are longer then 30 characters which for Oracle is too long and results in a:
>> 
>> ORA-00972: identifier is too long 
>> 
>> I expect that if I specify a target DB Eclipselink would be smart enough to take into consideration platform specific issues such as max. column name length when generating the DDL.
>> 
>> Any thoughts on why this is not the case?
>> 
>> Thanks,
>> 
>> -Noah
>> 
>> 
>> _______________________________________________
>> eclipselink-users mailing list
>> eclipselink-users@xxxxxxxxxxx
>> https://dev.eclipse.org/mailman/listinfo/eclipselink-users
> _______________________________________________
> eclipselink-users mailing list
> eclipselink-users@xxxxxxxxxxx
> https://dev.eclipse.org/mailman/listinfo/eclipselink-users



Back to the top