In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-04-09 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Development >
Share
Shulou(Shulou.com)06/02 Report--
This article mainly explains the "Hibernate knowledge point analysis", the article explains the content is simple and clear, easy to learn and understand, the following please follow the editor's ideas slowly in depth, together to study and learn "Hibernate knowledge point analysis" bar!
1. Avoid using tools to automatically generate your model
Yes, the use of these tools can save time (although we found that Dali has a serious bug, but we still use it), but * you have to do a lot of things again. In fact, manual does not take you a lot of time, when you do it yourself, it will give you a chance to familiarize yourself with the data.
two。 Use named query statements (NamedQueries) as often as possible
Although it's easy to write queries, in many cases it's better to use NamedQueries, which will help you do two things:
◆ can be more reused because named queries are usually in important places in the code.
◆ your query statement is correct at the beginning, so it is easier to find errors in the query statement.
It takes some time to get used to it, but it's worth it.
3. Expectation management
For any framework, technology, or even concept, this is very important and should be kept in mind. For some reason, people tend to focus on a feature that may not actually exist or may be exaggerated. Sometimes it's small and easy to understand (for example, to understand some actual work that needs to be mapped in Hibernate), and sometimes I don't know how they manage to implement concepts (such as how Hibernate manages plan fixes). In any case, it is important to find out what the expected goals are and then manage them. If your team thinks that Hibernate will make database administrators useless and fire them, then you will have a potential problem.
4. Use the rich domain model (rich domain modeling)
One of the sad things that happens to me is that I use Hibernate when a domain object is just a simple data container, and tools like Hibernate let us use data in an object-oriented way. Simply mapping data just keeps us halfway. When I instinctively thought of using the rich domain model (rich domain modeling), I found that we could reuse a lot of code, our other layers became less cluttered, and our code was easier to test.
Thank you for your reading, the above is the content of "Hibernate knowledge point analysis", after the study of this article, I believe you have a deeper understanding of the problem of Hibernate knowledge point analysis, and the specific use needs to be verified in practice. Here is, the editor will push for you more related knowledge points of the article, welcome to follow!
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.