Reputation: 775
As mentioned I need to set the size of the column in Hibernate , default for String it takes varchar(255) While creating the table,
I need to make it as varchar(8000) on the time of table creation.
I've already found couple of answers using 'Annotations'- like
@Column(length = 255)
@Lob
But is there any other way to do the same without using 'Annotations'
Thank You.
Upvotes: 1
Views: 1828
Reputation: 3353
When you say 'not using annotations', I assume you are using hibernate xml mapping files? I believe in the xml mapping files, you can map a column with a length, something like:
<property name="mycolumn" column="mycolumn" type="java.lang.String" length="8000" />
Upvotes: 3