[hibernate-dev] Associations on cassandra

Emmanuel Bernard emmanuel at hibernate.org
Fri Apr 20 10:59:22 EDT 2012


Here are my notes on Cassandra association. Note very readable but at least that there.


## Associations

Associations on composite keys cannot be supported in CQL 2. It can be done in CQL3

How to store associations will depend upon their type:

### Set

table:fk_column { fk_to -> ""}

### Bag

table:fk_column { fk_to -> n } where n is the number of occurrences

### List / Map (simple key)

table:fk_column { indexOrKey -> fk_to } where n is the number of occurrences



More information about the hibernate-dev mailing list