////
Licensed to the Apache Software Foundation (ASF) under one
or more contributor license agreements.  See the NOTICE file
distributed with this work for additional information
regarding copyright ownership.  The ASF licenses this file
to you under the Apache License, Version 2.0 (the
"License"); you may not use this file except in compliance
with the License.  You may obtain a copy of the License at

https://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing,
software distributed under the License is distributed on an
"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
KIND, either express or implied.  See the License for the
specific language governing permissions and limitations
under the License.
////

= GORM for Hibernate 7
:revnumber: {version}
:imagesdir: ./images
:source-highlighter: coderay
:last-update-label!:
:toc:
:sectnums:

[[introduction]]
== Introduction

include::introduction.adoc[]

[[releaseHistory]]
=== Release History
include::introduction/releaseHistory.adoc[]

[[upgradeNotes]]
=== Upgrade Notes

include::introduction/upgradeNotes.adoc[]

[[gettingStarted]]
== Getting Started

include::gettingStarted.adoc[]

[[hibernateVersions]]
=== Configuring Different Hibernate Versions

include::gettingStarted/hibernateVersions.adoc[]

[[springBoot]]
=== Using GORM in Spring Boot

include::gettingStarted/springBoot.adoc[]

[[outsideGrails]]
=== Using GORM for Hibernate Outside Grails

include::gettingStarted/outsideGrails.adoc[]

[[quickStartGuide]]
== Quick Start Guide

include::quickStartGuide.adoc[]

[[basicCRUD]]
=== Basic CRUD

include::quickStartGuide/basicCRUD.adoc[]

[[configuration]]
== Configuration

include::configuration/index.adoc[]

[[domainClasses]]
== Domain Modelling in GORM

include::domainClasses.adoc[]

[[gormAssociation]]
=== Association in GORM

include::domainClasses/gormAssociation.adoc[]

[[manyToOneAndOneToOne]]
==== Many-to-one and one-to-one

include::domainClasses/gormAssociation/manyToOneAndOneToOne.adoc[]

[[oneToMany]]
==== One-to-many

include::domainClasses/gormAssociation/oneToMany.adoc[]

[[manyToMany]]
==== Many-to-many

include::domainClasses/gormAssociation/manyToMany.adoc[]

[[basicCollectionTypes]]
==== Basic Collection Types

include::domainClasses/gormAssociation/basicCollectionTypes.adoc[]

[[gormComposition]]
=== Composition in GORM

include::domainClasses/gormComposition.adoc[]

[[inheritanceInGORM]]
=== Inheritance in GORM

include::domainClasses/inheritanceInGORM.adoc[]

[[sets,ListsAndMaps]]
=== Sets, Lists and Maps

include::domainClasses/sets,ListsAndMaps.adoc[]

[[persistenceBasics]]
== Persistence Basics

include::persistenceBasics.adoc[]

[[savingAndUpdating]]
=== Saving and Updating

include::persistenceBasics/savingAndUpdating.adoc[]

[[deletingObjects]]
=== Deleting Objects

include::persistenceBasics/deletingObjects.adoc[]

[[cascades]]
=== Understanding Cascading Updates and Deletes

include::persistenceBasics/cascades.adoc[]

[[fetching]]
=== Eager and Lazy Fetching

include::persistenceBasics/fetching.adoc[]

[[locking]]
=== Pessimistic and Optimistic Locking

include::persistenceBasics/locking.adoc[]

[[modificationChecking]]
=== Modification Checking

include::persistenceBasics/modificationChecking.adoc[]

[[querying]]
== Querying with GORM

include::querying.adoc[]

[[finders]]
=== Dynamic Finders

include::querying/finders.adoc[]

[[whereQueries]]
=== Where Queries

include::querying/whereQueries.adoc[]

[[criteria]]
=== Criteria Queries

include::querying/criteria.adoc[]

[[detachedCriteria]]
=== Detached Criteria

include::querying/detachedCriteria.adoc[]

[[hql]]
=== Hibernate Query Language (HQL)

include::querying/hql.adoc[]

[[nativeSql]]
=== Native SQL

include::querying/nativeSql.adoc[]

[[advancedGORMFeatures]]
== Advanced GORM Features

include::advancedGORMFeatures.adoc[]

[[eventsAutoTimestamping]]
=== Events and Auto Timestamping

include::advancedGORMFeatures/eventsAutoTimestamping.adoc[]

[[ormdsl]]
=== Custom ORM Mapping

include::advancedGORMFeatures/ormdsl.adoc[]

[[tableAndColumnNames]]
==== Table and Column Names

include::advancedGORMFeatures/ormdsl/tableAndColumnNames.adoc[]

[[caching]]
==== Caching Strategy

include::advancedGORMFeatures/ormdsl/caching.adoc[]

[[inheritanceStrategies]]
==== Inheritance Strategies

include::advancedGORMFeatures/ormdsl/inheritanceStrategies.adoc[]

[[identity]]
==== Custom Database Identity

include::advancedGORMFeatures/ormdsl/identity.adoc[]

[[compositePrimaryKeys]]
==== Composite Primary Keys

include::advancedGORMFeatures/ormdsl/compositePrimaryKeys.adoc[]

[[databaseIndices]]
==== Database Indices

include::advancedGORMFeatures/ormdsl/databaseIndices.adoc[]

[[optimisticLockingAndVersioning]]
==== Optimistic Locking and Versioning

include::advancedGORMFeatures/ormdsl/optimisticLockingAndVersioning.adoc[]

[[fetchingDSL]]
==== Eager and Lazy Fetching

include::advancedGORMFeatures/ormdsl/fetchingDSL.adoc[]

[[customCascadeBehaviour]]
==== Custom Cascade Behaviour

include::advancedGORMFeatures/ormdsl/customCascadeBehaviour.adoc[]

[[customHibernateTypes]]
==== Custom Hibernate Types

include::advancedGORMFeatures/ormdsl/customHibernateTypes.adoc[]

[[derivedProperties]]
==== Derived Properties

include::advancedGORMFeatures/ormdsl/derivedProperties.adoc[]

[[customNamingStrategy]]
==== Custom Naming Strategy

include::advancedGORMFeatures/ormdsl/customNamingStrategy.adoc[]

[[defaultSortOrder]]
=== Default Sort Order

include::advancedGORMFeatures/defaultSortOrder.adoc[]

[[programmaticTransactions]]
== Programmatic Transactions

include::programmaticTransactions.adoc[]

[[dataServices]]
== GORM Data Services
include::services/index.adoc[]

[[multipleDataSources]]
== Multiple Data Sources

include::multipleDataSources/index.adoc[]

[[multiTenancy]]
== Multi-Tenancy

include::multiTenancy/index.adoc[]

[[constraints]]
== Validation and Constraints

include::constraints/index.adoc[]

[[testing]]
== GORM and Testing

include::testing/index.adoc[]

[[databaseMigration]]
== Database Migration Plugin

include::databaseMigration/index.adoc[]
