Hi everybody, I have an object with a unique id (Guid) but now I need
to create a composite check constraint on it
based on three different fields.
I used the following mapping:


    <property name="First">
      <column name="first" sql-type="varchar (150)" not-null="true"
unique-key="CK_unique" />
    </property>
    <property name="Second">
      <column name="second" sql-type="varchar (150)" not-null="true"
unique-key="CK_unique" />
    </property>
    <property name="Third">
      <column name="third" sql-type="uniqueidentifier" not-null="true"
unique-key="CK_unique" />
    </property>

Unfortunately in SQL I have only a non clustered index composed by
these three fields, identified with UQ_...... name and not the one I
passed.
Also, in the constraints there isn't my check unique constraint so I
am allowed to insert twice the same object.
I tried to flas also the unique=true but that will create three
different unique constraints each one for one field.

Any idea?
Nhibernate 3.2

-- 
You received this message because you are subscribed to the Google Groups 
"nhusers" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/nhusers?hl=en.

Reply via email to