Hibernate profile properties and draw net source building

Source: Internet
Author: User

Hibernate profile properties and draw net source building
Core Profile Common Configuration Properties
Enterprise: 217 1793 408
Property Description
Hibernate.connection.driver_class the driver class for the specified database
Hibernate.connection.url the URL of the specified database
Hibernate.connection.username the user name of the specified database
Hibernate.connection.password the password for the specified database
Hibernate.dialect the dialect class of the specified database
Hibernate.show_sql set to True when the program runs output SQL statements in the console
Hibern.connection.datasource the Jndi name of the specified data source
Common elements of a map file

Schema= "SchemaName"
Default-cascade= "Cascade_style"
Default-access= "field|property| ClassName "
Default-laze= "True|false"
Auto-import= "True|false"
Package= "Package.name"
/>

1.schema (optional): The name of the database schema, and the table name is expanded to the fully qualified name of the table with the specified schema name.

2.default-cascade (optional, default is None): The default cascading style. Specifies a Java attribute and collection class for which the Cascade attribute is not explicitly noted, and Hibernate takes the corresponding default cascading style.

3.default-access (optional, property by default): Hibernate is used to access the properties of the policy, can be customized by implementing the PropertyAccessor interface.

4. The default property is actually accessing and setting properties through the set and get methods of the properties.

5.default-lazy (optional, true by default): Lazy loading, specifying Java properties and collection classes that do not explicitly indicate the lazy attribute, Hibernate takes the corresponding default loading style

6. Lazy loading, such as when we load an object, query the data table and then encapsulate the object, we just load the data table OID to memory, and the other properties are in the database, only when we want to get other properties (such as call get method) We then load the information into memory.

7.auto-import (optional, true by default): Specifies whether we can use a non-fully qualified class name in the query language (limited to classes in this mapping file).

8.package (optional): Specify a package prefix

9. Specify the name prefix for the following class Pojo classes, and if you do not specify a prefix, we need to specify the fully qualified class name

<class> elements

<class
Name= "ClassName"
Table= "TableName"
Discriminator-value= "Discriminator_value"
Mutable= "True|false"
Schema= "owner"
Proxy= "Proxyinterface"
Dynamic-update= "True|false"
Dynamic-insert= "True|false"
Select-before-update= "True|false"
Polymorphism= "Implicit|explicit"
where= "arbitrary SQL Where condition"
Persister= "Persisterclass"
Batch-size= "N"
optimistic-lock= "None|version|dirty|all"
Lazy= "True|false"
/>

Hibernate profile properties and draw net source building

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.