Small issues encountered in Hibernate

Source: Internet
Author: User

Today, I made a small mistake when I was working on the project. Maybe it was because I had not been in touch with Hibernate for a long time. Maybe it was because I didn't even notice these small problems during my learning time. Maybe the mistakes I made are not worth mentioning in your eyes. Maybe you will think that I am a layman and don't know the technology at all. However, I am not afraid of people's questions or irony, because I don't want to be a technical layman. If you think it is funny, please do not make fun of it.

In the Hibernate ing file, there are ing labels for each attribute of the object class. The simplest and most basic of them is the property tag. Funny. Today, when I was doing Hibernate object ing, I mapped a custom class property with a property tag. At that time, I felt very proud of nothing. After such a long period of time, I have not been in touch with and used ibbernetes, and now I have not forgotten it. However, something that I did not think of happened. Each time the server is started, a class attribute of the property is not defined. At that time, I was blind. What is the problem? Finally, I found a problem. Maybe what I found is not necessarily correct. I did not do too much data verification. However, I think this is the truth.

In another class, what is their ing relationship in Hibernate? I think they have four relationships: one-to-one, one-to-many, many-to-one, and many-to-many. From this we can see that the property tag should not be used for property ing in Hibernate ing, and should be mapped using features-to-one, one-to-one, one-to-least, and so on.

This is why I have been depressed for a long time today. I know many people will find it ridiculous. But it doesn't matter. This is the first time I write a blog. If I dare to write it, I will dare to face it. I hope you will take care of it in the future.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.