You can specify how the query would handle an uncommitted operation executed for an entity object. This is called specifying the flush mode.
You set the flush mode with the setFlushMode method of the javax.persistence.Query interface. With Cosminexus JPA Provider, you can only set AUTO as the value. You cannot specify COMMIT.
This setting is applied to a query regardless of the flush mode of the setFlushMode method of the EntityManager interface.