Hibernate Query method (complement)

Source: Internet
Author: User

-----------------siwuxie095

Hibernate Query method

1. Object Navigation query

Navigates to its associated object based on an object that has already been loaded

Take accounts and contacts as examples (one-to-many), as follows:

according to ID queries a customer and then queries all the contacts in the account

2. OID query

according to ID queries A record, returns an object

3. HQL query

Query object: Implementing queries using the HQL statement

4. QBC query

Criteria object: Call method implementation query directly (no write statement required)

5. local SQL query

SQLQuery objects: Implementing queries using plain SQL statements

Supplement: This article should have been Hibernate many-to-many queries and objects

Between the navigation query and the OID query (Category: Hibernate)

"Made by siwuxie095"

Hibernate Query method (complement)

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.