How to change Serializable to String when use Hibernate

后端 未结 1 1072
伪装坚强ぢ
伪装坚强ぢ 2021-01-20 20:16

I\'m using Hibernate to create entities class from MS SQL. But with NVARCHAR Hibernate changes to Serializable type. It makes some errors, exeptions because conflict between

1条回答
  •  -上瘾入骨i
    2021-01-20 21:12

    Edit your hibernate.reveng.xml file & add the following entry in the section of the file:-

    
    

    When the Hibernate Generation Wizard will generate the classes for you then it uses hibernate.reveng.xml for type conversion. So when the generator encounter NVARCHAR datatype it check for it's equivalent hibernate data type & convert it into String type.

    0 讨论(0)
提交回复
热议问题