How can I create a Unique Constraint that allows NULL values with Hibernate annotations? How can I create a Unique Constraint that allows NULL values with Hibernate annotations? sql-server sql-server

How can I create a Unique Constraint that allows NULL values with Hibernate annotations?


It is not an issue of Hibernate but of SQL Server, which considers NULL a value and does not allow a second NULL value. Wicked, I know.

Some links:

How do I create a unique constraint that also allows nulls?

http://sqlmag.com/database-development/multiple-nulls-unique-constraints