Learn Hibernate Diary (First Day)

xiaoxiao2021-03-06  14

Hibernate is a JDO tool. Its working principle is to establish a mapping relationship between the value object and the database table, so we only need to operate the purpose of using the database by operating some of these value objects and Hibernate. For example, using Hibernate's query, you can directly return a list (list) containing a value object, without having to load the data of the result set on a value object as the traditional JDBC access method, saving our coding work. A large number of labor. Hibernate provides HQL is a kind of SQL language, which is the same as EJBQL to provide objective database query, but HQL is very close to standard SQL in terms of functionality and usage. Step 1: Prepare work.

1. Download the ANT package to decompress (such as C: / Ant /). And add its bin directory (such as C: / Ant / bin) to the system PATH. 2. Download the latest version of Hibernate, Hibernate-Extension and MiddleGen-Hibernate packages.

http://prdownloads.sourceforge.net/hibernate/

In fact, I just started to do a long time, I was messy by Hibernate's version. In fact, it was later found that Hibernate 3.0 and Hibernate2.1 have great differences. Hibernate only supports Hibernate 3.0 in the official tool. The following is the version of my hibernate and related tools.

Hibernate-2.1.2, Hibernate-Extensions-2.1.3. Middlegen-Hibernate-R5, Ant-1.6.2

My development tool is Eclipse3.0 Tomcat Hibernate2.1.2 mysql

I found the e-book of this Hibernate Quick Start, I feel good, it is the lightweight of EJB.

转载请注明原文地址:https://www.9cbs.com/read-46895.html

New Post(0)