Thanks for the links.

I had already looked at all that, but it appears that there's no
solutions for people using MS SQLServer + identity fields.  The help
doesn't go through batch INSERT issue when using identity. The only
generator I seem to be able to use is 'native'.

I was hoping someone would have solved that issue.

On 9 avr, 11:53, Markus Zywitza <[email protected]> wrote:
> http://www.google.com/search?hl=de&q=nhibernate+hilo+hibernate_unique...
>
> Try the first two results.
>
> -Markus
>
> 2009/4/9 graphicsxp <[email protected]>
>
>
>
> > Ok, I've tried
>
> > <id name="Id" column="CommentID">
> >      <generator class="hilo"/>
> >    </id>
>
> > But I get the exception Invalid object name 'hibernate_unique_key'.  I
> > believe I can't use this generator with MS SQLServer 2005.  Any other
> > suggestions ?
>
> > On 9 avr, 11:45, Darius Damalakas <[email protected]> wrote:
> > > why not switch to primary key generation strategy HiLo? or SequenceHiLo?
>
> > > then you would get Id, and there would be minimal trips to database
>
> > > 2009/4/9 graphicsxp <[email protected]>:
>
> > > > Hi,
>
> > > > If I have an entity which holds a collection and I add 200 entities to
> > > > that collection, when I save it generates 200 INSERT's and it doesn't
> > > > batch them. I know this is because my tables have an identity field
> > > > and NH needs to do a select SCOPE_IDENTITY() after each INSERT.
> > > > However, since I really don't care getting the ID after inserting my
> > > > entities (the children that is), is there a way to force NH to do it
> > > > in a batch and tell it not to do the extra SELECT ?
>
> > > > Thanks
>
> > > --
> > > Darius Damalakas
--~--~---------~--~----~------------~-------~--~----~
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