I have the following Java class: The class represents a database table called example. I can use the following SQL query to fetch Example instances from the table with MyBatis: Let’s say that I will add a new field to the table and the class: boolean third. However, if I don’t remember to add the field to the select queries,
Tag: mybatis
Creating thread safe MyBatis sessions from a java.sql.Connection
I’m trying to use MyBatis with a Snowflake database. My situation is similar to that of this poster: Configure mybatis to use an existing connection Essentially, I can get a java.sql.Connection Object, but I cannot get that by way of a DataSource, or other steps normally done by RDBMS databases like Oracle. One proposed solution is to do something like
Passing a non-column parameter in a MyBatis ResultMap to a nested select
I’ve a One-to-Many relationship in my domain model where I basically want to read Foos and a filtered set of Bars with one MyBatis select statement using a nested select for the Bars. To explain: My domain model classes look more or less like this (the real domain model is more complex of course, but my problem boils down to