View Javadoc
1   /**
2    * Copyright By Grandsoft Company Limited.  
3    * 2012-6-8 下午02:13:41
4    */
5   package gboat2.base.dao.dialect;
6   
7   import java.sql.Types;
8   
9   import org.hibernate.Hibernate;
10  import org.hibernate.dialect.MySQL5Dialect;
11  
12  
13  /**
14   * 
15   * MySQL 扩展dialect
16   * @author lysming
17   * @since jdk1.6
18   * @date 2012-6-8
19   *  
20   */
21  
22  public class MySQLExtendDialect extends MySQL5Dialect {
23  	public MySQLExtendDialect(){
24  		super();
25  		registerColumnType(12, "longtext");
26  		registerColumnType(12, 65535, "varchar($l)");
27  		registerHibernateType(Types.LONGVARCHAR, Hibernate.TEXT.getName());
28  		registerHibernateType(Types.LONGVARCHAR, 65535, "text");
29  		registerHibernateType(Types.LONGVARCHAR, 65535, "longtext");
30  	}
31  }