Merge branch 'develop' into 2.1.x-SNAPSHOT

This commit is contained in:
Greg Burd 2017-10-12 09:23:18 -04:00
commit 2302b958e7
2 changed files with 9 additions and 7 deletions

View file

@ -133,12 +133,12 @@ public final class SelectOperation<E> extends AbstractFilterStreamOperation<E, S
Objects.requireNonNull(materializedViewClass); Objects.requireNonNull(materializedViewClass);
HelenusEntity entity = Helenus.entity(materializedViewClass); HelenusEntity entity = Helenus.entity(materializedViewClass);
this.alternateTableName = entity.getName().toCql(); this.alternateTableName = entity.getName().toCql();
this.allowFiltering = true; this.props.clear();
return this; entity
} .getOrderedProperties()
.stream()
public SelectOperation<E> from(String alternateTableName) { .map(p -> new HelenusPropertyNode(p, Optional.empty()))
this.alternateTableName = alternateTableName; .forEach(p -> this.props.add(p));
return this; return this;
} }
@ -243,6 +243,7 @@ public final class SelectOperation<E> extends AbstractFilterStreamOperation<E, S
+ prop.getEntity().getMappingInterface()); + prop.getEntity().getMappingInterface());
} }
/* TODO: is this useful information to gather when caching?
if (cached) { if (cached) {
switch (prop.getProperty().getColumnType()) { switch (prop.getProperty().getColumnType()) {
case PARTITION_KEY: case PARTITION_KEY:
@ -261,6 +262,7 @@ public final class SelectOperation<E> extends AbstractFilterStreamOperation<E, S
break; break;
} }
} }
*/
} }
if (entity == null) { if (entity == null) {

View file

@ -70,7 +70,7 @@ public class MaterializedViewTest extends AbstractEmbeddedCassandraTest {
public void testMv() throws Exception { public void testMv() throws Exception {
session session
.select(Cyclist.class) .select(Cyclist.class)
.<CyclistsByAge>from(CyclistsByAge.class) .from(CyclistsByAge.class)
.where(cyclist::age, eq(18)) .where(cyclist::age, eq(18))
.sync(); .sync();
} }