`
yaozuodaoforfly
  • 浏览: 119461 次
  • 性别: Icon_minigender_1
  • 来自: 深圳
社区版块
存档分类
最新评论

hibernate-Property

 
阅读更多

Property name Purpose
hibernate.dialect The classname of a Hibernate org.hibernate.dialect.Dialect which allows Hibernate to generate SQL optimized for a particular relational database.
e.g. full.classname.of.Dialect

In most cases Hibernate will actually be able to choose the correct org.hibernate.dialect.Dialect implementation based on the JDBC metadata returned by the JDBC driver.
 
hibernate.show_sql Write all SQL statements to console. This is an alternative to setting the log category org.hibernate.SQL to debug.
e.g. true | false
 
hibernate.format_sql Pretty print the SQL in the log and console. e.g. true | false
 
hibernate.default_schema Qualify unqualified table names with the given schema/tablespace in generated SQL. e.g. SCHEMA_NAME
 
hibernate.default_catalog Qualifies unqualified table names with the given catalog in generated SQL. e.g. CATALOG_NAME
 
hibernate.session_factory_name The org.hibernate.SessionFactory will be automatically bound to this name in JNDI after it has been created.
e.g. jndi/composite/name
 
hibernate.max_fetch_depth Sets a maximum "depth" for the outer join fetch tree for single-ended associations (one-to-one, many-to-one). A 0 disables default outer join fetching.
e.g. recommended values between 0 and 3
 
hibernate.default_batch_fetch_size Sets a default size for Hibernate batch fetching of associations. e.g. recommended values 4, 8, 16
 
hibernate.default_entity_mode Sets a default mode for entity representation for all sessions opened from this SessionFactory, defaults to pojo.
e.g. dynamic-map | pojo
 
hibernate.order_updates Forces Hibernate to order SQL updates by the primary key value of the items being updated. This will result in fewer transaction deadlocks in highly concurrent systems. e.g. true | false
 
hibernate.generate_statistics If enabled, Hibernate will collect statistics useful for performance tuning. e.g. true | false
 
hibernate.use_identifier_rollback If enabled, generated identifier properties will be reset to default values when objects are deleted. e.g. true | false
 
hibernate.use_sql_comments If turned on, Hibernate will generate comments inside the SQL, for easier debugging, defaults to false.
e.g. true | false
 
hibernate.id.new_generator_mappings Setting is relevant when using @GeneratedValue. It indicates whether or not the new IdentifierGenerator implementations are used for javax.persistence.GenerationType.AUTO, javax.persistence.GenerationType.TABLE and javax.persistence.GenerationType.SEQUENCE. Default to false to keep backward compatibility.
e.g. true | false
 

分享到:
评论

相关推荐

    hibernate-configuration-3.0.dtd、hibernate-mapping-3.0.dtd

    《深入理解Hibernate配置与映射:hibernate-configuration-3.0.dtd与hibernate-mapping-3.0.dtd解析》 在Java世界里,Hibernate作为一款强大的对象关系映射(ORM)框架,极大地简化了数据库操作。而`hibernate-...

    hibernate-mapping参数详解

    默认值是`property`,意味着Hibernate将使用getter和setter方法来读写属性。如果自定义了访问策略,可以通过实现`PropertyAccessor`接口来指定。 2. `default-lazy`:默认情况下,未显式指定`lazy`属性的Java属性和...

    hibernate-release-5.0.7.Final.zip官方

    <property name="hibernate.cache.region.factory_class">org.hibernate.cache.ehcache.EhCacheRegionFactory</property> <property name="hibernate.cache.use_second_level_cache">true</property> <property name...

    hibernate-shards.jar

    GNU LESSER GENERAL PUBLIC LICENSE Version 2.1, February 1999 ... 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA Everyone is permitted to copy and distribute verbatim copies ...

    hibernate-3.2.rar

    3. **实体类与映射文件**:每个数据库表对应一个Java实体类,通过`hibernate-mapping`标签下的`class`元素定义,使用`id`表示主键,`property`或`element`表示其他字段。此外,还可以使用注解方式进行映射,如`@...

    hibernate-dtd

    映射文件`*.hbm.xml`则是Hibernate对象与数据库表之间的映射定义,DTD在这里定义了如`<class>`、`<table>`、`<id>`、`<property>`、`<many-to-one>`等元素的结构。通过这些元素,开发者可以详细指定Java类与数据库表...

    [应用开发及迁移][客户端编程开发框架]Hibernate-Spatial指南.pdf

    <property name="dialect">org.hibernate.spatial.dialect.postgis.PostgisESDialect</property> <!-- 其他配置项 --> <property name="show_sql">true</property> <property name="format_sql">true</...

    hibernate-mapping

    《Hibernate Mapping:深入理解与应用》 Hibernate Mapping是Java领域中一种重要的对象关系映射(ORM)技术,它使得开发者可以使用面向对象的方式来操作数据库,极大地简化了数据存取的操作。在Hibernate中,...

    hibernate-dtd文件

    例如,当我们定义一个实体类映射时,IDE会自动提示可用的元素如`class`、`table`、`id`、`property`等,以及它们的属性,如`name`、`column`、`type`等。这样,我们就能快速准确地完成配置,减少出错的可能性。 在...

    hibernate--5.Hibernate配置文件详解

    - **Dialect**: `<property name="hibernate.dialect">`设置数据库方言,如`org.hibernate.dialect.MySQL5Dialect`,确保Hibernate能正确处理特定数据库的SQL语法。 - **Show SQL**: `<property name="hibernate....

    hibernate--5.Hibernate配置文件详解-2

    <property name="hibernate.transaction.factory_class">org.hibernate.transaction.JTATransactionFactory</property> <property name="jta.UserTransaction">java:comp/UserTransaction</property> ``` 如果你的...

    基于IDEA的SSH项目之五:集成Hibernate--程序包

    <property name="hibernate.dialect">org.hibernate.dialect.MySQL5Dialect</property> <property name="hibernate.connection.driver_class">com.mysql.jdbc.Driver</property> <property name="hibernate....

    hibernate--1.搭建hibernate环境

    <property name="hibernate.dialect">org.hibernate.dialect.MySQL5Dialect</property> <property name="hibernate.connection.driver_class">com.mysql.jdbc.Driver</property> <property name="hibernate....

    hibernate-orm实例

    <property name="dialect">org.hibernate.dialect.MySQLDialect</property> </session-factory> </hibernate-configuration> ``` ### 3. 创建实体类 Hibernate 实体类通常对应数据库中的表,类的属性对应表的列...

    sql2000与sql2005的hibernate-configuration

    <property name="hibernate.connection.username">username</property> <property name="hibernate.connection.password">password</property> <!-- 其他配置 --> </session-factory> </hibernate-...

    hibernate-search-4.1.1.Final-dist.zip

    <property name="hibernate.search.default.indexBase">/path/to/your/indexes</property> ``` **二、基本功能介绍** 1. **实体索引**: Hibernate Search允许你为实体类定义索引,通过@Field和@Analyzer等注解,...

    hibernate-c3p0-4.2.4

    <property name="hibernate.connection.datasource">java:comp/env/jdbc/MyDB</property> <property name="hibernate.c3p0.min_size">5</property> <property name="hibernate.c3p0.max_size">20</property> ...

Global site tag (gtag.js) - Google Analytics