session.execute("DROP INDEX IF EXISTS field_index");
session.execute("CREATE TABLE new_simple_field(id bigint PRIMARY KEY, existing_field text)");
session.execute("CREATE INDEX field_index ON schema_dynamic_update.new_simple_field(existing_field)");
//When
final PersistenceManagerFactory pmf = PersistenceManagerFactoryBuilder.builder(session.getCluster())
.withNativeSession(session)
.withEntities(Arrays.<Class<?>>asList(EntityWithNewSimpleField.class))
.enableSchemaUpdate(false)
.enableSchemaUpdateForTables(ImmutableMap.of("schema_dynamic_update.new_simple_field", true))
.relaxIndexValidation(true)
.build();
final PersistenceManager pm = pmf.createPersistenceManager();
pm.insert(new EntityWithNewSimpleField(id, "existing", "new"));
//Then
final EntityWithNewSimpleField found = pm.find(EntityWithNewSimpleField.class, id);