开发者

if hibernate can generate the db schema, how to tell it to create a column of nvarchar(max)?

开发者 https://www.devze.com 2022-12-15 19:20 出处:网络
i开发者_运维问答f hibernate can generate the db schema, how to tell it to create a column of nvarchar(max) in a sql server db?

i开发者_运维问答f hibernate can generate the db schema, how to tell it to create a column of nvarchar(max) in a sql server db?

what tools are available to go the other way around, i.e. a tool that reads the database schema and outputs POJO's with annotations?


There's no way I know of to use the maximum value for varchar when using Hibernate to generate a database schema. Even if you could this would probably be a bad idea since your code would behave differently with different databases instead of having a default length it's expecting for a given field. As far as reverse engineering goes check out this link to use Hibernate tools to reverse engineer a database from with in Eclipse, or see this link for a way to reverse engineer the database schema using Ant.

0

精彩评论

暂无评论...
验证码 换一张
取 消