Fluent NHibernate 3 uniquekey custom constraint name
Asked Answered
C

1

9

I am trying to give a custom Unique Constraint Name as follows:

Map(x => x.Name).UniqueKey("MY_CONSTRAINT_NAME").Column("FUNCTION_NAME");

The Field is mapped with a unique constraint but the constraint name is self-managed and doesn't take the name I chose ("MY_CONSTRAINT_NAME") Is this a BUG or am I using it incorrectly?

Cleaves answered 31/5, 2011 at 15:3 Comment(2)
Are you deleting the schema each time. I've seen issues before where I needed to delete the schema for changes like that to take effect. So basically drop the database and recreate it via exporting the schema.Disinfection
I always drop the database manually and then i recreate the schema but i cant see any changeCleaves
C
2

NHibernate itself does not allow you to supply a name for the unique key. https://nhibernate.jira.com/browse/NH-1955

Coupler answered 9/3, 2012 at 21:42 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.