I have the MyBatis auto-generated Mapper and Example classes and is trying to get the SQL statement as a String text in my code. Is there a way I can do this? I know it gets logged in the log file, however I would like to access the statement before it gets logged.
e.g: SqlSession session = mySqlSessionFactory.openSession(); MyMapper mapper = session.getMapper(MyMapper.class); MyExample example = new MyExample(); example.createCriteria().andNameEqualTo("Name");
I would like to obtain a String that looks like: select * from `my` where name = 'Name'; before the mapper executes the selectByExample(example).
You received this message because you are subscribed to the Google Groups "mybatis-user" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
For more options, visit https://groups.google.com/d/optout.