Thanks for your reply, I was using transaction, but It was indeed the
flushmode that did the trick. It probably defaults
to 'never'. So I change my configuration to use another mode. What
mode would you recommend?

On Apr 12, 1:32 pm, Diego Mijelshon <[email protected]> wrote:
> You are not flushing your session and/or you're not using a transaction.
>
> This is the right way to persist an entity:
> using (var tx = session.BeginTransaction())
> {
>   session.Save(yourNewInstance);
>   tx.Commit();
>
> }
>
> I'm assuming session.FlushMode is set to anything but Never. In that case,
> you'd have to call session.Flush() before the commit.
>
>    Diego
>
> On Mon, Apr 12, 2010 at 06:49, BramW <[email protected]> wrote:
> > Are there any special prerequisites when switching from native Id
> > generation?
>
> > I'm trying to use HiLo or Guid.Comb as identity generators, but I seem
> > not to be able to store my model objects when using those generators.
> > When I switch back to native or identity I seem to get the objects
> > into the database.
>
> > NHibernate Profiler shows correct INSERT queries in the latter case
> > but none when using HiLo or Guid.Comb. My problem might be quite
> > trivial but I'm not able to see what I'm doing wrong
>
> > --
> > 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]<nhusers%[email protected]>
> > .
> > For more options, visit this group at
> >http://groups.google.com/group/nhusers?hl=en.

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