Get the App
SLTechnology News&Howtos  ›  Development  › 

How to solve the problem that individual fields can not be found in the returned data from the SSM Mapper file?

Shulou Source: shulou.com Published: 2022-06-02 00:30:01 10月01日 Update

This article will explain in detail how to solve the problem that the returned data from the SSM Mapper file can not find individual fields. The editor thinks it is very practical, so I share it for you to do a reference. I hope you can get something after reading this article.

SSM Mapper query finds out the reason why individual fields cannot be found in the returned data.

Hump naming rule is enabled. The fields in Bean are not recognized.

Comment out or remove the field in the entity class from transposition capitalization

SSM cannot query database data

These two days set up a ssm environment, want to test first, the result of the test will be a problem, the same sql can be executed normally in navicate, not in mapper, it will always be null.

Finally found the reason.

The column names of my database tables are all underlined, and I need to turn on automatic hump naming rule (camel case) mapping in mybatis-config.xml, which is a similar mapping from the classic database column name A_COLUMN to the classic Java attribute name aColumn.

On "how to solve the SSM Mapper file query returned data can not find individual fields of the problem" this article is shared here, I hope the above content can be of some help to you, so that you can learn more knowledge, if you think the article is good, please share it out for more people to see.

Tags: Data fields queries questions databases articles files reasons more classic hump test no good practical underlined content capital capital entity Apple Docker Huawei Linux macOS MariaDB Microsoft MySQL NVidia OPPO Reno Microsoft Docker Huawei Shulou Information macOS