views:

25

answers:

1

Hi,

We're starting to using NHibernate at my workplace, including generating the schema from the mappings. One thing our DBAs want is consistent names for the primary and foreign key relationships. I've been able to set the FK constraint name, but looking at the documentation for <id> it doesn't look like there's a way to name the primary key constraint. http://www.nhforge.org/doc/nh/en/index.html#mapping-declaration-id

I assume I'm missing something, as this seems like a pretty basic thing to do.

Thanks Andy

A: 

It's not supported, unfortunately. Here's an ugly workaround.

Jamie Ide
Hmm, hopefully it will be added soon. We're using Fluent, so we'll probably just create a seperate script we run post schema creation. Thanks for the link!
Andy