0
Jparepository offers us options save
and saveAndFlush
to persist the objects to the database. Unlike saveAndFlush
, the save
keeps the persistence state in memory, which ends up generating memory problems in some applications.
As there is no method "saveAllAndFlush" the question is: When using the saveAll
, does it also keep the state in memory? It would require a flush or commit call explicitly?
Are you using Hibernate as a JPA implementation? And another, maybe you are confusing the application and the operation of the method, the
save
keeps the persistence state in memory until thecommit
or theflush
be realized only.– nullptr
Yes, I’m using it as a JPA implementation. Yes, I know
save
keeps up theflush
or thecommit
, but what aboutsaveAll
it keeps in memory the same way or it automatically makes theflush
?? That’s the question– Gustavo