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

  • Home
  • SEARCH
  • 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 3331152
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 17, 20262026-05-17T23:33:28+00:00 2026-05-17T23:33:28+00:00

I have declareted the fallowing Mapping for NHibernate: <class name=Sales table=Sales lazy=false > <id

  • 0

I have declareted the fallowing Mapping for NHibernate:

<class name="Sales" table="Sales" lazy="false"  >
    <id name="Id" column="Id" type="Guid">      
                    <generator class="assigned"/>
    </id>
  <version name="ObjectVersion" column="ObjectVersion"/>
    <property name="Number" column="Subject" type="String" length="255"  />
    <property name="Text" column="Body" type="String" length="50" not-null="true"  />
</class>

I should now add a additional Column called Key which is defined as an AutoIncrement-Column. Can someone give me a tip how I have to declare this column? This Column has not to be the primary-key – i need only a additional column which has a integer which count up for each record.

Thanks for your help.

Best Regards, Thomas

  • 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-17T23:33:29+00:00Added an answer on May 17, 2026 at 11:33 pm

    Are you using SQL Server? If yes, then just create an Identity column ALTER TABLE Sales ADD Key INTEGER Identity(1,1) Then map it as a normal property. It will not be the primary key but it will auto-increment.

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

Sidebar

Related Questions

I have the fallowing mapping: <class name=Country table=Country lazy=false > <cache usage=read-write/> <id name=Id
I have declared a column of type NVARCHAR(MAX) in SQL Server 2008, what would
I have the following action declared in my struts.xml: <action path=/updateAccountInfo type=org.myCompany.UpdateAccountAction name=myAccountForm scope=session
I have declared the following type KEY = (IPv4, Integer) type TPSQ = TVar
I have the declared a class in following way class A: def __init__(self, list_1,
I have the following template method declared in my interface: class IObjectFactory { public:
I have two functions declared as following, using extern C aming to avoid name
I currently have a model set up like so: I have a Test class
I have declared the following enum type in which I want the first member
I have the following declared on a Singleton type object named CicApplication: internal static

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.