问题
We are using MS-SQL ,Oracle and mysql as our database.
We have used hibernate annotations to create tables, in the annotation class file we have declared column definition as
@Column(name="UCAALSNO",nullable=false,columnDefinition="nvarchar(20)") and this works fine for MS-SQL.
But when it comes to Oracle nvarchar throws an exception as oracle supports only nvarchar2 and Mysql only supports nchar()(max length=255)
How to create annotation file to support datatype nvarchar for three databases.
来源:https://stackoverflow.com/questions/23774474/nvarchar-in-sql-oracle-and-mysql-in-hibernate-annotation-mapping