@ Fabio: THANK YOU so much for the articles! Now I understand why NH is inserting into the DB before I call ISession.Flush(): It has to get the next ID gen by SQL :-} I overlooked this because I am used to working w/GUIDs, however this is a legacy DB.
I took your advice about using <generator class="hilo"/> in the class id. BUT, now the DB blows up my app again because it says it can't find the "hibernate_unique_key" table to update the "next_hi" column... Could you send me a short schema of the table so I can create the hibernate_unique_key table in the DB myself and possibly avoid this error in the future? I think the user that my app is running under has not the permission to add tables to the DB. In conclusion; the hilo concept makes sense, but what precautions do you have against permission errors? Would it be feasible to add another attribute to the <generator> element in NH, say - "sync_with_table" so that NH simply takes a COUNT(*) of all the rows in the given table and starts to assign new Primary Keys from there? Now, of course, these keys should not be persisted by NH! But this addition would certainly help NH properly keep track of all its transient objects without having to INSERT or CREATE a new table in the DB... Just my humble user opinion... Keep up the good work though! BTW, I was using NH 1.x.x.x couldn't keep track of exact version. @Gustavo Thanks for all the help in past forums! On Jun 19, 11:43 am, Fabio Maulo <[email protected]> wrote: > 2009/6/19 nautic20 <[email protected]> > > > QUESTIONS: > > I didn't seem to have this problem in NHibernate 1.6, Is there > > something new added to 2.0? ' > > I never heard about NH1.6, from where you have download it ? > -- > 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] For more options, visit this group at http://groups.google.com/group/nhusers?hl=en -~----------~----~----~----~------~----~------~--~---
