Is these some Way to define my own mapping of hibernate to database Object?? For example, by default String maps to varchar(45), I want to change it to TEXT or just varchar(245) , what are the ways of achieving it ???
1 Answer
You can use either
<property name="description" type="string">
<column name="description" length="100" />
</property>
in xml or
@Column(name="description", length=100)
annotation in class.
Alternatively, you can use @Type annotation - for more info see this or this.
You probably want to use @Type(type="text").
1 Comment
ManMohan Vyas
I too searched on net ...somehow not able to reach right place ... wrong search supposigly ...your link is perfect .... thanks a ton ..