INNER JOIN FETCH

Source: Internet
Author: User

The main spirit of Inner Join is exclusive, call it exclusivity! That is, the data that does not match the Join rules will be excluded, such as the Supplier Code (SUPPLIERID) of a product that does not appear in the Suppliers table, and this record will be ruled out.



Outer Join:

Select < fields to query > from <left tables >

<left | right> [Outer] Join <right datasheet > on <join rules >



The syntax of Outer can be omitted, for example you can use a LEFT join or right join, in essence, Outer Join is inclusive, let it be inclusive! Unlike the exclusivity of the Inner join, the query results in the left Outer join will contain all the data from the left table, and in reverse, the query for right Outer join will contain all the data

Fetch:

When we query the parent object, the default is only the contents of the parent, does not contain childs information, if the Parent.hbm.xml set lazy= "false" to remove all associated childs content at the same time.
The problem is that I want to hibernate both the default performance and the temporary flexibility. This is the function of fetch. We can compare the relationship between fetch and lazy= "true" to the programmatic transaction and declarative transaction in the transaction, but that is probably the meaning.
Total, fetch is the level of code that gives you an opportunity to seize the initiative.

INNER JOIN FETCH

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.