You're both right. Non-int non-guid ids default to using assigned, so it's the same difference.
On Tuesday, May 26, 2009, Eyston <[email protected]> wrote: > > I might be misunderstanding but ... > > If you specify the key in your code when you create the entity you'll > want the generator to be 'assigned'. > > Id(v => v.Id).GeneratedBy.Assigned().ColumnName("No_"); > > I use this since all the keys are natural in my legacy db (I hate > it ... a lot). > > > On May 26, 3:11 pm, David Woods <[email protected]> wrote: >> I got this to work by not specifying any generator. i.e.: >> >> Id(x => x.Id).ColumnName("No_"); >> >> >> >> David Woods wrote: >> > I am mapping against a legacy database that's primary key is strings not >> > integers. Is there a way to use a string for the Id() mapping? (We can't >> > add an artificial key to the database either). > > > --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Fluent NHibernate" 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/fluent-nhibernate?hl=en -~----------~----~----~----~------~----~------~--~---
