withMappedKeyspace("lookup_KS_NAME", "demo").
build();
try
{
SchemaGenerator schemaGenerator = persistenceManager.createSchemaGenerator();
System.out.println("Executing CQL DDL statements...");
System.out.println();
for (String stmt : schemaGenerator.generateLiveAlterDDL().getStatements())
{
System.out.println(stmt);
}
CqlStatementList cqlDDL = schemaGenerator.generateLiveAlterDDL();
cqlDDL.execute(persistenceManager.driverSession());
System.out.println("Wait until all schema objects are available...");
System.out.println();
persistenceManager.refreshSchema(); // This is necessary until schema changes are propagated from the Java Driver to Caffinitas Mappe automatically!
schemaGenerator.forSchemaObjectsAvailable().awaitUninterruptibly();
PersistenceSession session = persistenceManager.createSession();
try
{