Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

Analysis of Hibernate3.1 problems with examples

2025-03-13 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Development >

Share

Shulou(Shulou.com)06/02 Report--

This article mainly explains "Hibernate3.1 problem example Analysis". Friends who are interested may wish to have a look. The method introduced in this paper is simple, fast and practical. Next, let the editor take you to learn "Hibernate3.1 problem example Analysis"!

Today, we are running a very simple save () method to report:

Exception in thread "main" net.sf.hibernate.MappingException: Dialect does not support identity key generation at net.sf.hibernate.dialect.Dialect.gerIdentitySelectString (Dialect.java:305) at net.sf.hibernate.persister.AbstracEntityPersister. (AbstractEntityPersister.java:646) at net.sf.hibernate.persister.EntityPersister. (EntityPersister.java:690) at net.sf.hibernate.persister.PersisterFactory.createClassPersister

At the moment, I was really stopped, or sent some time to read, just finished the project is the same configuration everything is smooth, this time how to report this anomaly, just began to focus on. Hbm.xml file mapping, but are generated by Hibernate inversion control, there will be no error.

It is better to use the network. We have found a solution to this problem in CSDN. The fields that grow automatically: values can be increment, identity, sequence, hilo, native. Etc.

Change the profile from something like this:

/ / changed to

As a result, everything worked successfully.

I don't have a thorough understanding of the specific reasons. I don't have time. I just know that jar with and Hibernate3.1 is used in identity, while exceptions are thrown in hibernate3.2, but not in increment. Specifically, what is the essential difference between Hibernate3.1 and Hibernate3.2 here? it may need in-depth research.

At this point, I believe you have a deeper understanding of "Hibernate3.1 problem example Analysis". You might as well do it in practice. Here is the website, more related content can enter the relevant channels to inquire, follow us, continue to learn!

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.

Share To

Development

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report