I have a field URL countryURL; in a Country class. I want to store its data into a COUNTRY table in a database through Hibernate.
Which Hibernate type I should use in the hibernate mapping file
<property column="COUNTRY_URL" name="countryURL" type="..."/>
It is not excepting string and text type.
You can create a org.hibernate.UserType for URL which maps to a varchar column. See Custom value types in the reference documentation.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With