cassandra-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Ryan Svihla>
Subject Re: Cassandra Object Mapper - Dynamically pass keyspace value
Date Sun, 25 Oct 2015 12:58:23 GMT
You should probably ask the java driver user list!forum/java-driver-user

However I do have some suggestions (any follow up questions please ask on
the java driver list though):

   1. It's optional so you don't have to pass it (
   and you can rely on the mapper knowing about the keyspace before you pass
   this (either via connect or a "USE command" on the session object (which is
   what I do in my project with the Table annotation).
   2. You can just rely on Java and delegate this to a static property
   which reads a configuration value from say a system property (which you can
   set in Maven using profiles for example).

On Tue, Oct 20, 2015 at 12:21 PM, Ashish Soni <> wrote:

> Hi All ,
> is there any way i can specify value of keyspace during compile time like
> using maven build
> hard coding keyspace name inside the java class is bit not comfortable as
> if there a change and there are 1000's of files it become a big maintenance
> issue
> @UDT (keyspace = "complex", name = "address")public class Address {
>     private String street;
>     private String city;
>     private int zipCode;


Ryan Svihla

View raw message