Try something like:Id(t => t.Id).GeneratedBy.Sequence("uid_sequence");I also just wanted to make sure that you've set up fluent/nhibernate's dialect to use the oracle client that most closely matches your legacy product; On Thu, Apr 23, 2009 at 2:24 PM, George Mauer <[email protected]> wrote: > Same as before just with Id replacing Map: public TankMap() { > WithTable("TANK"); > Id(t => t.Id, "TANK_ID"); > Map(t => t.Name, "TANK_NAME"); > Map(t => t.Enabled, "ENABLED"); > } > > The Ids are generated using an oracle sequence. Like I said this is a > legacy database, but this is a simple enough mapping that I hope I can get > it working. > > On Thu, Apr 23, 2009 at 2:21 PM, Hudson Akridge > <[email protected]>wrote: > >> What's your new Id() fluent mapping look like? >> >> >> On Thu, Apr 23, 2009 at 2:10 PM, George Mauer <[email protected]> wrote: >> >>> >>> Thanks James, >>> Now I've got the far scarier "Dialect does not support sequences" >>> error. >>> http://pastebin.com/f5186fed2 >>> Any chance you can help me out with this one? >>> The id is indeed mapped via a sequence. >>> >>> On Apr 23, 2:02 pm, James Gregory <[email protected]> wrote: >>> > You haven't got an Id mapped. You need to use the Id method instead of >>> Map >>> > for your Id property. >>> > >>> > On Thu, Apr 23, 2009 at 7:58 PM, George Mauer <[email protected]> >>> wrote: >>> > >>> > > I am trying to create a simple demo project with Sharp Architecture >>> > > and run into the following problem trying to map my first entity to >>> my >>> > > legacy oracle database. >>> > >>> > > The full exception is here:http://pastebin.com/f69b8b105 >>> > >>> > > Here is my class: >>> > > public class Tank : Entity { >>> > > [NotNull, NotEmpty] >>> > > public virtual string Name { get; set; } >>> > > public virtual bool Enabled { get; set; } >>> > > } >>> > > and here is my map: >>> > > public TankMap() { >>> > > WithTable("TANK"); >>> > > Map(t => t.Id, "TANK_ID"); >>> > > Map(t => t.Name, "TANK_NAME"); >>> > > Map(t => t.Enabled, "ENABLED"); >>> > > } >>> > >>> > > What am I doing wrong? >>> >>> >> >> >> > > > > --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---
