This worked for me not sure if its the easiest way or not:

var config = new Configuration().Configure();

foreach (var mapping in config.ClassMappings) {
        if (mapping.Identifier != null)
             ((SimpleValue)
mapping.Identifier).IdentifierGeneratorStrategy = "assigned";
}

_sessionFactory = config.BuildSessionFactory();




Cheers
Stefan

On Mon, Apr 6, 2009 at 12:44 PM, Stefan Sedich <[email protected]> wrote:
> Hello,
>
> Would there be a way in code to disable all the ID generators? I am
> using XML mapping with guid.comb generators, but I would like to
> change them all to assigned for a moment while I insert some test
> data.
>
>
>
> Cheers
>
> --
> Stefan Sedich
> Software Developer
> http://weblogs.asp.net/stefansedich
>



-- 
Stefan Sedich
Software Developer
http://weblogs.asp.net/stefansedich

--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---

Reply via email to