Get the App
SLTechnology News&Howtos  ›  Development  › 

How to do Mapper multi-table association query

Shulou Source: shulou.com Published: 2022-06-02 10:44:20 10月02日 Update

In this issue, Xiaobian will bring you about how to make Mapper multi-table association queries. The article is rich in content and analyzes and narrates from a professional perspective. After reading this article, I hope you can gain something.

select p.id, p.create_time, p.update_time, p.create_user, p.update_user, p.project_name, p.test_user, p.dev_user, p.simple_desc, p.other_desc, p.project_code, p.belong_env_id, p.status_id,u.status_name,u.description from projectinfo_temp p LEFT JOIN usestatus u on p.status_id = u.id2, offlink pojo@ToStringpublic class ProjectinfoTemp { private Integer id; private Date createTime; private Date updateTime; private String createUser; private String updateUser; private String projectName; private String testUser; private String devUser; private String simpleDesc; private String otherDesc; private String projectCode; private Integer belongEnvId; private Integer statusId; /** * Association Status Table Activation Status */ private Uestatus usestatus; status tables/** * * @author liwen406 * @date 2019-04-21 09:12 */@ToStringpublic class Usestatus { private Integer id; private String statusName; private String description;3 Write an associated sql statement

imitative writing

p.id, p.create_time, p.update_time, p.create_user, p.update_user, p.project_name, p.test_user,p.dev_user, p.simple_desc, p.other_desc, p.project_code, p.belong_env_id, p.status_id,u.status_name,u.description select distinct from projectinfo_temp order by ${orderByClause} select distinct from projectinfo_temp p LEFT JOIN usestatus u on p.status_id = u.id order by ${orderByClause} 4 front-end call writing Application No. application name test leader development lead Module/Interface/Use Case state operation run edit delete , [Home] [Previous] [Next] [Last Page] 5. Visit result display

The above is how to make Mapper multi-table association query shared by Xiaobian for everyone. If there is a similar doubt, please refer to the above analysis for understanding. If you want to know more about it, please pay attention to the industry information channel.

Tags: Association status query content writing statement responsible person analysis application professional small and medium rich content front end name that is interface article more module activation Apple Docker Huawei Linux macOS MariaDB Microsoft MySQL NVidia OPPO Reno Docker MySQL macOS Xiaomi vpn