HHH-6255 correctly handling quoting fk names

This commit is contained in:
Brett Meyer 2013-10-07 15:15:29 -04:00
parent 0593cbbc5a
commit bc31357436
2 changed files with 2 additions and 2 deletions

View File

@ -2052,7 +2052,7 @@ public abstract class Dialect implements ConversionContext {
final StringBuilder res = new StringBuilder( 30 );
res.append( " add constraint " )
.append( constraintName )
.append( quote( constraintName ) )
.append( " foreign key (" )
.append( StringHelper.join( ", ", foreignKey ) )
.append( ") references " )

View File

@ -133,7 +133,7 @@ public class ForeignKey extends Constraint {
if ( dialect.supportsIfExistsBeforeConstraintName() ) {
buf.append( "if exists " );
}
buf.append( getName() );
buf.append( dialect.quote( getName() ) );
if ( dialect.supportsIfExistsAfterConstraintName() ) {
buf.append( " if exists" );
}