-
Notifications
You must be signed in to change notification settings - Fork 233
Using Compound keys with Kundera
mevivs edited this page Oct 31, 2012
·
16 revisions
Unstructured Data? Scalability is not an issue, use NOSQL! Compound keys is one way to achieve faster search over denormalized data. Kundera(2.2 release on-wards) supports compound key.
You can define compound key with entity definition using @EmbeddedId annotation, like:
@Entity
@Table(name="User", schema="KunderaExamples@mongoTest")
public class PrimeUser
{
@EmbeddedId
private CompoundKey key;
Here key has to be an Embeddable entity:
@Embeddable
public class CompoundKey
{
@Column private String userId;
@Column private int tweetId;
@Column private UUID timeLineId;
Performing any CRUD operation is similar the way, for single primary key.
You can refer here for examples:
**Note:**Current trunk branch supports it for MongoDB and cassandra. Feature will be available with 2.2 release.
-
Datastores Supported
- Releases
-
Architecture
-
Concepts
-
Getting Started in 5 minutes
-
Features
- Object Mapper
- Polyglot Persistence
- Queries Support
- JPQL (JPA Query Language)
- Native Queries
- Batch insert update
- Schema Generation
- Primary Key Auto generation
- Transaction Management
- REST Based Access
- Geospatial Persistence and Queries
- Graph Database Support
-
Composite Keys
-
No hard annotation for schema
-
Support for Mapped superclass
-
Object to NoSQL Data Mapping
-
Cassandra's User Defined Types and Indexes on Collections
-
Support for aggregation
- Scalar Queries over Cassandra
- Connection pooling using Kundera Cassandra
- Configuration
-
Kundera with Couchdb
-
Kundera with Elasticsearch
-
Kundera with HBase
-
Kundera with Kudu
-
Kundera with RethinkDB
-
Kundera with MongoDB
-
Kundera with OracleNoSQL
-
Kundera with Redis
-
Kundera with Spark
-
Extend Kundera
- Sample Codes and Examples
-
Blogs and Articles
-
Tutorials
* Kundera with Openshift
* Kundera with Play Framework
* Kundera with GWT
* Kundera with JBoss
* Kundera with Spring
-
Performance
-
Troubleshooting
-
FAQ
- Production deployments
- Feedback