Hi,
I am using the schema export feature quite extensively as I develop my domain and was wondering if it is possible in the mapping files to create a unique constraint/index across multiple properties. For example, suppose I have the following 2 properties in an Order object:
Code:
<property name="ReferenceNumber" column="ReferenceNumber" type="String" length="20" not-null="true" />
<many-to-one name="Customer" column="CustomerID" class="SomeDomain.Customer, SomeDomain" not-null="true" />
I want to ensure that the order reference number is unique within each customer and would like that constraint created in the DB as well as doing the validation in my domain. Is this possible in the mapping file or do I just have to add those types of constraints in the DB manually?
Cheers,
Jason