# Hibernate for 3.x? New Typeconversion?

**URL:** <https://forum.liquibase.org/t/hibernate-for-3-x-new-typeconversion/2691>\
**Category:** Liquibase Development\
**Created:** [September 12, 2013, 7:01pm UTC](https://forum.liquibase.org/t/hibernate-for-3-x-new-typeconversion/2691 "2013-09-12T19:01:00Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Guest](https://avatars.discourse-cdn.com/v4/letter/g/8dc957/32.png) [@Guest](https://forum.liquibase.org/u/Guest)\
**Post date:** [September 12, 2013, 7:01pm UTC](https://forum.liquibase.org/t/hibernate-for-3-x-new-typeconversion/2691/1 "2013-09-12T19:01:00Z")

</div>

Hi,  
i got 2 questions:  
  
1. Will the Hibernate extension be fixed for use with Liquibase 3.x anytime soon?  
  
2. We used to extend the converter classes for some databases i.e. MSSQLTypeConverter, OracleTypeConverter.   
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; So that our developers could just write “String(50)”, “BigDecimal(11,3)” etc. in the changeSets.  
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Additionally we have a properties file for all our typedefinitions, where we map the javatype to each databasetype.  
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; If the dev doesn’t specify a length then the one from our props is taken.  
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; For example:

1. #boolean  
boolean.liquibase: boolean  
boolean.ora: number  
boolean.mssql: tinyint  
boolean.length: 1,0
2. #BigDecimal  
BigDecimal.liquibase: BigDecimal  
BigDecimal.ora: number  
BigDecimal.mssql: numeric  
BigDecimal.length: 19,2  

&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; How can we achieve something like that with 3.x, because the conversion process seems totally different now?

---

<div class="post-metadata">

**Author:** ![nvoxland](https://avatars.discourse-cdn.com/v4/letter/n/87869e/32.png) [@nvoxland](https://forum.liquibase.org/u/nvoxland)\
**Post date:** [September 12, 2013, 7:01pm UTC](https://forum.liquibase.org/t/hibernate-for-3-x-new-typeconversion/2691/2 "2013-09-12T19:01:00Z")

</div>

I haven’t gotten to the hibernate extesion with 3.0 yet, but it looks like there is a pull request coming that will hopefully get it updated:&nbsp;[http://forum.liquibase.org/topic/maven-hibernate](http://forum.liquibase.org/topic/maven-hibernate#49382000000868013)

Interesting idea with the properties file. The type conversion is different in 3.0, the way to do it now is to create liquibase.datatype.LiquibaseDataType extensions. Each data type has its own class like liquiblase.datatype.core.VarcharType but if you create a subclass of the ones you need to control and return a higher value than&nbsp;LiquibaseDataType.PRIORITY\_DATABASE Liquibase will use your class instead.&nbsp;

You would override the&nbsp;toDatabaseDataType(Database database) method and set parameters to be the default values if not set ad then call super.toDatabaseDataType(database)

Nathan
