6. Crawl Strategy

Source: Internet
Author: User

6.1 , based on XML the crawl

A crawl strategy is a strategy for acquiring a connection object

1, based on XML crawl Many-to-one

1.2. Set Fecth=join

1.3, but Fecth=join cannot crawl the list in the HQL, if you need to crawl the list in the hql there are two ways

• Sets the batch-size of one end of the object, which loads multiple data through the in statement

• Write pre-fetch (join fetch) in the HQL statement

1.5. Collection Grab

Best practice: Many situations do not set One-to-many, if you want to set One-to-many can be set to Subselect

6.2 , based on annotation the crawl

You can use the @batchsize setting on class Batch-size

Collection Crawl

6. Crawl Strategy

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.