Hi there,
is there way to set setReadOnly on the connection? Ideally as an attribute in the statement in the Mapper XML file. Then we could cherry pick which statements are eligible for reading from the slave and which are not. So before the statement is executed, actually before a transaction happens, set setReadOnly(true), run the statement and then set setReadOnly(false). Since Connections are usually pooled it makes no sense to toggle readOnly for a longer scope.
Background: As far as I understand we can distribute load among our master mysql and his slaves (lol), but we need to set the setReadOnly(true) on the connection.
Any ideas?
kind regards
Björn