Hibernate is an open-source object relationship ing framework. It implements lightweight object encapsulation for JDBC, so that Java programmers can use the object programming thinking to manipulate the database as they wish. It not only provides ing between Java classes and data tables, but also provides data query and recovery mechanisms. Compared with using JD
Thanks to the XML persistence feature recently released in hibernate 3, Java developers now have a framework component, which is an easy-to-implement object relationship (OR) XML persistence provides an efficient and consistent method.
The ease of use, high performance, object link
This article will introduce the CRUD operation examples of persistence classes with List attributes in Hibernate. If you are interested, please refer to them.
1. hibernate. cfg. xml
The Code is as follows:
Copy code
"-// Hibernate/Hibernate Configurat
http://blog.csdn.net/yerenyuan_pku/article/details/65462930Hibernate Persistence ClassWhat is a persistent class? The English name of the persistence class in Hibernate is Persistent Object (PO), PO=POJO+HBM mapping configuration file.For the PO in Hibernate, the following rules are written:
You must provide a
1. hibernate. cfg. xml The code is as follows:Copy code "-// Hibernate/Hibernate Configuration DTD 3.0 // EN"Http://www.hibernate.org/dtd/hibernate-configuration-3.0.dtd> 2. Persistence class Member. java The code
Hibernate Persistence class
What is a persistent class? The English name of the persistence class in Hibernate is Persistent Object (PO), PO=POJO+HBM mapping configuration file.For the PO in hibernate, there are rules for writing: You must provide a parameterless public con
and disadvantages. In the "select" section, I will introduce how to select a framework. In the "Timing" section, I will discuss some application scenarios where you should consider the application framework and some application scenarios where you should find alternative solutions. Finally, in the "Advantages and Disadvantages" section, I will discuss all the advantages and disadvantages of a framework when you decide to adopt it. The following is the most famous
Hibernate Persistence principlesPersistence java classes must follow the following principles:1. This class usually requires an id. We recommend that you use the encapsulation type.2. This class cannot be modified by final.3. You need to provide a non-parameter constructor for this class.4. The getter/setter method must be provided for all attributes.5. If operat
exists in the data table, an exception is thrown: java. lang. IllegalArgumentException12. Hibernate calls the native jdbc api:Session. doWork(New Work(){@ Override public voidExecute(Connection connection)Throws SQLException{//Use the JDBC native API}});What are the three persistence states of hibernate objects?
Insta
PO persistence object and PO in hibernate
I. Understand the persistence object PO:
In hibernate applications,Each table in the database corresponds to a persistent object PO.. PO can be viewed as a java object mapped to a database table. The simplest PO corresponds to a reco
Hibernate Object Persistence frameworkJDBC :( Java Data Base Connectivity) java Database Connection
The java. SQL package provides JDBC APIs to write program code for accessing the database. common interfaces and classes include the following:
DriverManager: Driver manager,
JDBC: (Java data Base Connectivity)Java database connection The java.sql package provides the JDBC API through which you can write program code to access the database. The interfaces and classes that are used frequently include the following:
DriverManager: Driver Manager, responsible for creating database connections
Connection: representing the database connection
Statement: Responsible
From the perspective of persistence, Hibernate divides objects into four states: Persistence State, temporary state, free state, and delete state. The Session method can convert objects from one state to another.Temporary object in the Persistent Object state (Transient ):
-When the proxy primary key is used, the OID is usually null-not in the Session cache-no
JDBC: (Java data Base Connectivity)Java database connection The java.sql package provides the JDBC API, which allows you to write program code that accesses the database. Common interfaces and classes include the following:
DriverManager: Driver Manager, responsible for creating database connections
Connection: representing the database connection
Statement: Responsible for executing SQL s
A detailed comparison of the "persistence framework" MyBatis with Hibernate
Objective
Comparison between MyBatis and hibernate
Brief introduction
Development speed
Database portability
Caching mechanism comparison
A comparative summary of the two
A word summary
ObjectiveThis blog post we focus on the
Hibernate is an object-relational mapping solution under the Java language. It is a free, open source software issued using the GNU Wide general Public License. It provides an easy-to-use framework for the mapping of object-oriented domain models to traditional relational databases. Hibernate is also currently the most popular database
Hibernate is an object-relational mapping solution under the Java language. It is a free, open source software issued using the GNU Wide general Public License. It provides an easy-to-use framework for the mapping of object-oriented domain models to traditional relational databases. Hibernate is also currently the most popular database
ObjectiveThis blog post we focus on the difference between Mybatis and hibernate , of course, in the previous blog post we have thoroughly studied the principles of Mybatis and hibernate.Mybatis
Introduction and principle of "persistence framework" MyBatis
"Persistence framework" SPRINGMVC+SPRING4+MYBATIS3 integration, development of simple Web proje
The interview was asked, maybe understood, but not clear.Hibernate is a framework for ORM (object relation Mapping, objects relational mapping), so-called object-relational mapping, which, in layman's words, is to save Java objects in a relational database. What hibernate does is to project the object into a relational database and then implement persistence. It
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:
info-contact@alibabacloud.com
and provide relevant evidence. A staff member will contact you within 5 working days.