[hibernate-dev] [ORM] save vs persist for POST_INSERT generators

Emmanuel Bernard emmanuel at hibernate.org
Thu Sep 25 14:39:05 EDT 2014


Hi Steve,

I've got a quick question.

I sort of remember that we were delaying `persist()` operations - until
flush I suppose. This is something we could not do to `save()` because
`persist()` does not force us to return the id while save does.  I am in
particular considering the case where the generator is of type
POST_INSERT like a column identifier.

While browsing the code I could not spot any different between the
handing of a save event and a persist event and the actual SQL executoin
seems to happen duing the `persist()` call as opposed to `flush()`.

Is it that I have dreamt it all? Or did we used to do that but not
anymore?

Emmanuel


More information about the hibernate-dev mailing list