epbernard wrote:
Did you implement your own Dialect ?
Yes, I did. I have two dilect one for Sybase and one for Access. Here is my dialect for Sybase:
public class SybaseDialect extends Dialect {
public SybaseDialect() {
super();
register( Types.BIT, "TINYINT" ); //Sybase BIT type does not support null values
register( Types.BIGINT, "NUMERIC(19,0)" );
register( Types.SMALLINT, "SMALLINT" );
register( Types.TINYINT, "TINYINT" );
register( Types.INTEGER, "INT" );
register( Types.CHAR, "CHAR(1)" );
register( Types.VARCHAR, 255, "VARCHAR($l)" );
register( Types.VARCHAR, 1073741823, "TEXT" );
register( Types.FLOAT, "FLOAT" );
register( Types.DOUBLE, "DOUBLE PRECISION" );
register( Types.DATE, "DATETIME" );
register( Types.TIME, "DATETIME" );
register( Types.TIMESTAMP, "DATETIME" );
register( Types.VARBINARY, "VARBINARY($l)" );
register( Types.NUMERIC, "NUMERIC(19,$l)" );
register( Types.BLOB, "IMAGE" );
register( Types.CLOB, "TEXT" );
getDefaultProperties().setProperty(Environment.USE_OUTER_JOIN, "true");
getDefaultProperties().setProperty(Environment.STATEMENT_BATCH_SIZE, NO_BATCH);
}
public String getAddColumnString() {
return "add";
}
public String getNullColumnString() {
return " null";
}
public boolean qualifyIndexName() {
return false;
}
public boolean supportsForUpdate() {
return false;
}
public boolean supportsIdentityColumns() {
return true;
}
public String getIdentitySelectString() {
return "select @@identity";
}
public String getIdentityColumnString() {
return "IDENTITY NOT NULL";
}
public String getNoColumnsInsertString() {
return "DEFAULT VALUES";
}
public char closeQuote() {
return ']';
}
public char openQuote() {
return '[';
}
}