views:

15

answers:

1

if 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?

+1  A: 

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.

Jared