SSH Framework Hibernate query detailed (1), Debug breakpoint debugging

Source: Internet
Author: User
Tags ssh

I. Overview of Queries
1, get/load primary key query
2. Object Navigation Query
3. HQL query, Hibernate query Language hibernate provides the object-oriented querying language.
4, criteria query, fully object-oriented query (query by Criteria, QBC)
5, sqlquery, local SQL query
1) Cons: Cannot cross database platform: If the database, SQL statements may have to change.
2) Usage scenarios: For situations where complex SQL,HQL cannot be implemented, you can use local SQL queries.

Ii. preparatory work for the presentation
1. JavaBeans and corresponding mapping files
1) Dept

2) Employee

2, Hibernate.cfg.xml

3. Database table structure:

Third, Get/load primary key query

Four, object navigation query

Five, HQL query
1. Precautions:

2, the query column of three types:

3. Condition Inquiry 1:

4. Condition Inquiry 2:

5, aggregate function statistics:

6, group query:

Breakpoint Debugging:

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: info-contact@alibabacloud.com 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.