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

View file

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