---------------------------------------------------------------------------------
i found that a lot of people have the same doubt. to help to solve this issue
i'm quoting christian bauer:
"in case anybody finds this thread...
persist() is well defined. it makes a transient instance persistent. however,
it doesn't guarantee that the identifier value will be assigned to the persistent
instance immediately, the assignment might happen at flush time. the spec doesn't say
that, which is the problem i have with persist().
persist() also guarantees that it will not execute an insert statement if it is
called outside of transaction boundaries. this is useful in long-running conversations
with an extended session/persistence context.a method like persist() is required.
save() does not guarantee the same, it returns an identifier, and if an insert
has to be executed to get the identifier (e.g. "identity" generator, not "sequence"),
this insert happens immediately, no matter if you are inside or outside of a transaction. this is not good in a long-running conversation with an extended session/persistence context."
---------------------------------------------------------------------------------