////
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.
////

=== Compatibility with GORM for Hibernate
This implementation tries to be as compatible as possible with GORM for Hibernate. In general you can refer to the https://docs.grails.org/latest/grails-data/[GORM documentation] and the "Domain Classes" section of the https://docs.grails.org/latest/[reference guide] (see the right nav) for usage information.

The following key features are supported by GORM for Mongo:

* Simple persistence methods
* Dynamic finders
* Criteria queries
* Named queries
* Inheritance
* Embedded types
* Query by example

However, some features are not supported:

* HQL queries
* Composite primary keys
* Many-to-many associations (these can be modelled with a mapping class)
* Any direct interaction with the Hibernate API
* Custom Hibernate user types (custom types are allowed with a different API)

There may be other limitations not mentioned here so in general it shouldn't be expected that an application based on GORM for Hibernate will "just work" without some tweaking involved. Having said that, the large majority of common GORM functionality is supported.
