Shreyas Deshpande
Shreyas Deshpande

Reputation: 149

hbm2ddl : on delete set null issue

I am generating schema using hibernate hbm2ddl feature.. while defining Realtionship between entities, I want to set ON DELETE SET NULL for child class. But hibernate does not allow us to define such constraint annotationally. I want to define this annotation. how to achieve this?

Upvotes: 0

Views: 94

Answers (1)

Oskar Berggren
Oskar Berggren

Reputation: 5647

Have a look at 5.6. Auxiliary Database Objects in the NHibernate reference. You can write an ALTER command tweak the constraint as needed.

Upvotes: 1

Related Questions