Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6372707
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 25, 20262026-05-25T01:16:18+00:00 2026-05-25T01:16:18+00:00

I need constraints created in the following manner: CONSTRAINT [IX_Unique_1] UNIQUE NONCLUSTERED ( [Ordering]

  • 0

I need constraints created in the following manner:

CONSTRAINT [IX_Unique_1] UNIQUE NONCLUSTERED 
(
    [Ordering] ASC,
    [Description] ASC
),
CONSTRAINT [IX_Unique_2] UNIQUE NONCLUSTERED 
(
    [Description] ASC
)

I have the following nHibernate mapping:

<property name="Description" column="Description" type="String" unique-key="IX_Seed_Template_Fields_Result" />

<property name="Ordering" column="Ordering" type="Int32" unique-key="IX_Seed_Template_Fields_Result" />

So how can I add a separate unique constraint just for the Description column?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-25T01:16:19+00:00Added an answer on May 25, 2026 at 1:16 am

    If you don’t care about the index names in the database, you can map it like this:

    <property 
      name="Description" 
      column="Description" 
      type="String" 
      unique-key="Description, Ordering_Description" />
    
    <property 
      name="Ordering" 
      column="Ordering" 
      type="Int32" 
      unique-key="Ordering_Description" />
    

    you can provide a comma separated list of index names. All columns which have the same name in the list are added to the same index.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have the following table: CREATE TABLE FE_USER ( userid int identity (321,4) CONSTRAINT
I have the following Query and i need the query to fetch data from
I have the following tables in MySQL server: Companies: - UID (unique) - NAME
I need to solve the following problem: I have multiple rectangles of sizes: width
Please read the entire question. I have a unique situation with several constraints that
I need to create a custom constraint annotation which can access the value of
We're designing a database in which I need to consider some FK(foreign key) constraints.
I need to rename a constraint in an Oracle databse, but I don't know
I have a organization name table with the following structure given below: CREATE TABLE
I have an XML structure like the following: <tables> <table name=tableName1> <row ID=34 col1=data

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.