I would like to do this as well (but in the database). How can I tell the nh schema to make a non identity property be an auto increment column? Do I need custom DDL for this?
On Sep 21, 11:13 am, Diego Mijelshon <[email protected]> wrote: > Then use C#, not NHibernate. > Generators are for ids only. > > Diego > > > > > > > > On Tue, Sep 21, 2010 at 10:19, Yauhen <[email protected]> wrote: > > But generated means "Generated properties are properties which have > > their values generated by the database". > > But for event Id I need it to be autoincremented in C# code. Changes > > in database (like triggers) are not desired. > > > On Sep 17, 2:11 am, Fabio Maulo <[email protected]> wrote: > > > <property .... generated="insert"/> > > > <column blah blah sql-type=""/> > > > > On Thu, Sep 16, 2010 at 5:48 AM, Yauhen <[email protected]> wrote: > > > > Is there any way to use generator for non id column? > > > > So for example I have 2 columns: > > > > [IdentityColumn] [int] IDENTITY(1,1) NOT NULL, > > > > [EventId] [int] NOT NULL, > > > > > first is primary key, second should be auto incremented (<generator > > > > class="increment"/>). > > > > And most desired it should be done in single transaction. Are there > > > > any ways to describe this? > > > > > -- > > > > 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]<nhusers%[email protected] > > > > > > > <nhusers%[email protected]<nhusers%252bunsubscr...@googlegroup > > s.com> > > > > > > > . > > > > For more options, visit this group at > > > >http://groups.google.com/group/nhusers?hl=en. > > > > -- > > > Fabio Maulo > > > -- > > 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]<nhusers%[email protected] > > > > > . > > For more options, visit this group at > >http://groups.google.com/group/nhusers?hl=en. -- 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.
