Code:
<hibernatetool >
<annotationconfiguration configurationfile="${target.hibernate.conf.dir}/hibernate.cfg.xml"
propertyfile="${target.hibernate.conf.dir}/hibernate.properties" />
<hbm2ddl export="false" update="false" drop="true"
create="true" delimiter=";" format="true" haltonerror="true" />
</hibernatetool>
I use above ant task to generate DDL file. In my java file I use
Code:
@Column(length=Integer.MAX_VALUE)
It works for mysql: table field convert String to "longtext" type.
But I tried on postgreSQL, it generate "varchar(2147483647)" type. It won't works for PostgreSQL(8.3). The expected type is "text".
Any fix? Thanks.