Skip to content
Advertisement

Tag: mybatis-sql

With MyBatis. How can I map two different records in one table, then construct a single query result when joining that table?

The definition of my query result entity has two fields, origin and destination, which are both Location type, and I’m trying to fetch the information in location table with JOINS.Here are the resultMap definition and SQL: SQL: It is supposed that the origin and destination are different records, however I found that origin and destination turned out to be same…

Advertisement