Analysis on the wrong problem of hibernate

Source: Internet
Author: User

Parsing: Member variables that use the final decoration are constants

Parsing: No objects exist for statemoresession

parsing: A PreparedStatement can perform multiple executquery methods

Resolution: A using HQL to deal with massive data performance is very low, can not be used this way.

B. The JDBC API performs best and is best suited for processing massive amounts of data.

C. If a one-time flush,hibernate will put the object of the operation into its own internal cache, it will cause memory overflow, so it cannot be used in this way.

D. It is also a good idea to purge the cache in a timely manner if it is broken into multiple flush.

Parsing: {l.*} represents a property of a query reference entity. The * number indicates that all properties of the entity class are queried.

Parsing: A named query is a process that can do complex queries

Analytical:

B: Named query by configuring <query> (corresponding HQL statement) or <sql-query> (corresponding to native SQL statements) in the mapping file

Parsing: The data involved in the SQL statement is not loaded into the session cache.

parsing: Native SQL queries cannot use HQL and criteria

Resolution: Wrong Expression!

Parsing: Hibernate is recommended for use with the DoWork Execute method to complete the JDBC operation.

Analysis on the wrong problem of hibernate

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.