Hibernate main configuration file attributes,

Source: Internet
Author: User

Hibernate main configuration file attributes,

The show_ SQL value is TRUE or FALSE.

Indicates whether to display the executed SQL statement

The value of format_ SQL is TRUE or FALSE.

Whether to format the executed SQL statement

The value of hbm2ddl indicates the following content:

Create ---- Delete first, and create the corresponding database table

Update ---- create a table if the table does not exist. update the table if the table does not exist.

Create-drop ---- create a table during initialization, and delete the table when SessionFactory executes close.

Validate ---- verify that the table structure is consistent. If the table structure is inconsistent, an exception is thrown.

Below are some common database connection configurations

MySQL

Hibernate. dialect org. hibernate. dialect. MySQLDialect
Hibernate. dialect org. hibernate. dialect. MySQLInnoDBDialect
Hibernate. dialect org. hibernate. dialect. MySQLMyISAMDialect
Hibernate. connection. driver_class com. mysql. jdbc. Driver
Hibernate. connection. url jdbc: mysql: // test
Hibernate. connection. username gavin
Hibernate. connection. password


Oracle

Hibernate. dialect org. hibernate. dialect. Oracle8iDialect
Hibernate. dialect org. hibernate. dialect. Oracle9iDialect
Hibernate. dialect org. hibernate. dialect. Oracle10gDialect
Hibernate. connection. driver_class oracle. jdbc. driver. OracleDriver
Hibernate. connection. username ora
Hibernate. connection. password ora
Hibernate. connection. url jdbc: oracle: thin: @ localhost: 1521: orcl
Hibernate. connection. url jdbc: oracle: thin: @ localhost: 1522: XE

DB2

Hibernate. dialect org. hibernate. dialect. DB2Dialect
Hibernate. connection. driver_class com. ibm. db2.jcc. DB2Driver
Hibernate. connection. driver_class COM. ibm. db2.jdbc. app. DB2Driver
Hibernate. connection. url jdbc: db2: // localhost: 50000/somename
Hibernate. connection. url jdbc: db2: somename
Hibernate. connection. username db2
Hibernate. connection. password db2

 

 




Related Article

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.