In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-01-18 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Development >
Share
Shulou(Shulou.com)06/02 Report--
This article mainly shows you "what is the difference between autoMapping and autoMappingBehavior". It is easy to understand and clear. I hope it can help you solve your doubts. Let the editor lead you to study and learn the article "what is the difference between autoMapping and autoMappingBehavior".
The difference between autoMapping and autoMappingBehavior autoMappingBehavior
Configured in settings in the mybatis core configuration file, specifies how MyBatis should automatically map columns to fields or properties. NONE means to cancel automatic mapping; PARTIAL only automatically maps result sets that do not define a nested result set mapping. FULL automatically maps any complex result set, whether nested or not. The default is partial, which is a global setting
AutoMapping
Used in resultMap or association,collections, it is a local switch. When enabled, the attributes in the nested query are automatically set. The priority of the local switch is higher than that of all switches. When all the switches enable FULL mapping, the local switch is turned off, and the mapping still does not occur.
Examples
Configuration information. The Settings of mybatis is all the default configuration. We test the results of local automatic mapping.
SELECT id, username, jobs, phone, idCard.cardId as cardId, idcard.address as address FROM t_customer, idcard WHERE t_customer.cardId=idcard.cardId and t_customer.id=# {id}
Test result
DEBUG [main]-= > Preparing: SELECT id, username, jobs, phone, idCard.cardId as cardId, idcard.address as address FROM t_customer, idcard WHERE t_customer.cardId=idcard.cardId and tasking customer.idling?
DEBUG [main]-= > Parameters: 2 (Integer)
DEBUG [main]-Preparing: SELECT id, username, jobs, phone, idCard.cardId as cardId, idcard.address as address FROM t_customer, idcard WHERE t_customer.cardId=idcard.cardId and tasking customer.idcards?
DEBUG [main]-= > Parameters: 2 (Integer)
DEBUG [main]-Preparing: SELECT id, username, jobs, phone, idCard.cardId as cardId, idcard.address as address FROM t_customer, idcard WHERE t_customer.cardId=idcard.cardId and tasking customer.idcards?
DEBUG [main]-= > Parameters: 2 (Integer)
DEBUG [main]-
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.