Hibernate (and JPA) are designed to automatically detect and persist changes to persistent objects to the database. There is no "save" operation.
If you don't want things saved, you should use detached objects. Either use a StatelessSession
to load them, or call detach after loading your objects. This removes them from the monitoring that will automatically save them.
Don't mess with the flush settings, it will just give you headaches later.
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…