hibernate - Unneccessary database changeSet related to boolean after grails 2.4.3 upgrade -


I am using the Postgradz database. After raising Grails 2.4.3 I get changes in this type of database for all the Bullying fields:

  changeSet (Author: "I (Generate)", id: "1383573084784- 1 ") {barriers (faucet:" wrong ")}}}}  {addColumn (table name:" chapters ") {column (default value: true, name:" éfreemable ", type:" boolean " There is a  boolean  field in the  

iframe a domain code chapter . Even after running this migration, it is always generated by dbm-gorm-diff

I have noticed that instead of the older versions of grails there Instead of bool in Boolean changes

I Hibernate Version 4.3.5.5

My solution for this:

Config.groovy

  grails.gorm.default. Type mapping = {"user-type": my.hibernate.type.BooleanBitType, category: boolean "user-type" type: My.hibernate.type.BooleanBitType, class: boolean}   

BooleanBitType.java

  import my.hibernate.type .descriptor.BooleanBitTypeDescriptor; Import ORGenet Type. Import org.hibernate.type.descriptor.sql.SqlTypeDescriptor; Public Class Boolean BitType Org. Hibernate Type. Boolean type {public static final boolean bit type INSTANCE = new boolean type (); Public BooleanBitType () {This (Boolean bititip descriptor. INSTANCE, BooleanType descriptor. INSTANCE); } Protected Boolean bititip (SQL type descriptor skaltype descriptor, BooleanType descriptor JavaType descriptor) {Super (SKL type descriptor, Java type descriptor); }}   

BooleanBitTypeDescriptor.java

  public class BooleanBitTypeDescriptor org.hibernate.type.descriptor.sql.BooleanTypeDescriptor {public static Ultimate BooleanBitType descriptor INSTANCE = new Boolean bititieptic descriptor (); Public Boolean bittip descriptor () {super (); } Public int acquired SQL type () {return type. BIT; }}    

Comments

Popular posts from this blog

Out of index C/C++ -

regex - PatternSyntaxException: while using String.ReplaceAll function in java? -

java - Projects which are accessed via multiple (different) IDEs: Ant or Maven? -