(Quick Reference)

1 Introduction - Reference Documentation

Authors: Paras Lakhani

Version: 5.0.8.RELEASE

1 Introduction

Apache Cassandra is a massively scalable open source NoSQL database.

Cassandra can be used for managing large amounts of data across multiple data centers and the cloud.

The goal of this grails-data-mapping subproject is to provide a 'as-complete-as-possible' GORM implemenatition that maps domain classes and instances to Cassandra 2.0 tables.

This project aims to provide an object-mapping layer on top of Cassandra to ease common activities such as:

  • Marshalling from Cassandra to Groovy/Java types and back again
  • Support for GORM dynamic finders, criteria and named queries
  • Session-managed transactions
  • Validating domain instances backed by the Cassandra datastore
  • Cassandra schema creation

1.1 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 GORM documentation and the "Domain Classes" section of the reference guide (see the right nav) for usage information.

The following key features are supported by GORM for Cassandra:

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

However, some features are not supported:

  • HQL queries
  • Associations (these should be supported in the future)
  • Any direct interaction with the Hibernate API
  • Custom Hibernate user types
  • Queries using OR, LIKE, NOT EQUAL, IS NULL, negation, property comparison, offset in paging, most projections (mainly because Cassandra itself doesn't support these)
  • Table-per-hierarchy mapping

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.