-->
These old forums are deprecated now and set to read-only. We are waiting for you on our new forums!
More modern, Discourse-based and with GitHub/Google/Twitter authentication built-in.

All times are UTC - 5 hours [ DST ]



Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 3 posts ] 
Author Message
 Post subject: 2.1 Backward compatiblity
PostPosted: Wed Dec 24, 2003 2:20 pm 
Newbie

Joined: Wed Nov 12, 2003 11:07 am
Posts: 15
Location: Canada
Hi!

I am a user of 2.0.3. Tried to upgrade to Hibernate 2.1.1 There is a
problem with register method of Dialect class. In 2.1 the method name is changed to registerColumnType

I was able to add register method to source to make my code works with both version:

protected void register(int code, int capacity, String name) {
typeNames.put(code, capacity, name);
}

protected void register(int code, String name) {
typeNames.put(code, name);
}

Thanks,
-Kourosh


Top
 Profile  
 
 Post subject:
PostPosted: Mon Dec 29, 2003 6:40 am 
Hibernate Team
Hibernate Team

Joined: Sun Sep 14, 2003 3:54 am
Posts: 7256
Location: Paris, France
Did you implement your own Dialect ?

_________________
Emmanuel


Top
 Profile  
 
 Post subject:
PostPosted: Mon Dec 29, 2003 10:45 am 
Newbie

Joined: Wed Nov 12, 2003 11:07 am
Posts: 15
Location: Canada
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 '[';
}

}


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 3 posts ] 

All times are UTC - 5 hours [ DST ]


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
© Copyright 2014, Red Hat Inc. All rights reserved. JBoss and Hibernate are registered trademarks and servicemarks of Red Hat, Inc.