5--Basic usage of Hibernate--4 9 other common configuration properties

Source: Internet
Author: User

Hibernate other common Configuration properties:

⊙hibernate.show_sql: Is the SQL statement used at the bottom of the console output hibernate persistence operation. Only a value of true and false is two.

⊙hibernate.format_sql: Whether to turn SQL statements into well-formed SQL. Accept only true and false values of two.

⊙hibernate.use_sql_comments: Whether to add comments that help debug in hibernate-generated SQL statements. Only true and false values are accepted.

⊙hibernate.jdbc.fetch_size: Specifies the size of the number of JDBC fetches. It accepts an integer value, and its essence is to call the Statement.setfetchsize () method.

⊙hibernate.jdbc.batch_size: Specifies the size of the bulk update hibernate uses JDBC2. It accepts an integer value, and it is recommended to take a value between 5~30.

⊙hibernate.connection.autocommit: Sets whether to submit automatically. It is generally not recommended to turn on autocommit.

⊙hibernate.hbm2ddl.auto: Sets whether database tables are automatically established based on the mappings of persisted classes when creating sessionfactory. This property can be a validate, update, create, and Create-drop 4 values.

∮create: The table will be re-built each time you create a sessionfactory.

∮create-drop: Each time the sessionfactory is turned off, the program automatically drop the data table you just created.

∮update: Each time you create a sessionfactory, Hibernate automatically builds the table if there are no tables in the database that correspond to the persisted class, and if a table already exists in the database that corresponds to the persisted class, the existing data tables and data are kept, but only the data is updated or inserted.

∮validate:

Wait a minute...

La La la

5--Basic usage of Hibernate--4 9 other common configuration properties

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.