BX-ORM
  • Introduction
    • Release History
      • 1.x
    • About This Book
  • Getting Started
    • Installation
    • Configuration
      • Custom Hibernate Config
      • Secondary Caches
      • Logging
  • Modeling
    • Entities
    • Identifiers
    • Properties
    • Relationships
  • Usage
    • Built-In Functions
    • Querying
    • Events
    • Session Management
    • HQL
    • Transactions
    • Caching
  • External Links
    • ForgeBox
    • API docs
    • Source Code
    • Issue Tracker
Powered by GitBook
On this page

Was this helpful?

Edit on GitHub
Export as PDF
  1. Getting Started
  2. Configuration

Custom Hibernate Config

For full Hibernate configuration support, you can create an XML file containing any configuration properties you wish to configure:

this.ormSettings = {
    // ...
    ormconfig : "./config/persistence.xml"
};

You can then populate the XML file with valid Hibernate configuration syntax:

<!-- persistence.xml -->
<?xml version="1.0" encoding="UTF-8"?>    
<!DOCTYPE hibernate-configuration PUBLIC    
        "-//Hibernate/Hibernate Configuration DTD 3.0//EN"    
        "https://hibernate.org/dtd/hibernate-reverse-engineering-3.0.dtd">    
<hibernate-configuration>    
    <session-factory>    
    
    <!-- https://docs.jboss.org/hibernate/orm/5.4/javadocs/org/hibernate/cfg/AvailableSettings.html#USE_SQL_COMMENTS -->
    <property name="hibernate.use_sql_comments">true</property>
    <property name="hibernate.cache.use_query_cache">true</property>
         
    </session-factory>
</hibernate-configuration>
PreviousConfigurationNextSecondary Caches

Last updated 2 months ago

Was this helpful?