Session flush mode is set to Flushmode.AUTO on each change
ctrl+f ‘flushmode’ in https://svn.strategoxt.org/websvn/WebDSL?op=comp&compare=/webdsls/trunk/src/org/webdsl/dsl/to-java-servlet/java-entity-main.str@5385&compare=/webdsls/trunk/src/org/webdsl/dsl/to-java-servlet/java-entity-main.str@5386
This might have been done to set the default session flushmode to
COMMIT, until there is a change. When there is a change, change it to
AUTO, such that queries performed after a change will return the correct results (respecting the new state).
The problem is that I cannot change the session flushmode in some native java code that needs to persist large batches of entities, because it will be overridden each time a entity property is changed. It now flushes over and over again whenever I need to perform a query on unchanged data.Submitted by Elmer van Chastelet on 30 September 2013 at 11:09
I managed to workaround the issue by setting the flush-mode to
MANUALevery time a query is performed that does not target the changed data. This speeds up my code significantly.
Log in to post comments