verifyIdentifiers(Vertex.class, ids);
if (!verticesLoaded) {
if (ids.length > 0) {
Set<Object> identifiers = Arrays.stream(ids).map(Neo4JSession::processIdentifier).collect(Collectors.toSet());
List<Object> filter = identifiers.stream().filter(id -> !vertices.containsKey(id)).collect(Collectors.toList());
<BUG>if (!filter.isEmpty()) {
Statement statement = new Statement("MATCH " + generateVertexMatch("n") + " WHERE n." + vertexIdFieldName + " in {ids} RETURN n", Values.parameters("ids", filter));
</BUG>
Stream<Vertex> query = vertices(statement);
return combine(identifiers.stream().filter(vertices::containsKey).map(id -> (Vertex)vertices.get(id)), query);

verifyIdentifiers(Vertex.class, ids);
if (!verticesLoaded) {
if (ids.length > 0) {
Set<Object> identifiers = Arrays.stream(ids).map(Neo4JSession::processIdentifier).collect(Collectors.toSet());
List<Object> filter = identifiers.stream().filter(id -> !vertices.containsKey(id)).collect(Collectors.toList());
if (!filter.isEmpty()) {
String predicate = partition.generateVertexMatchPredicate("n");
Statement statement = new Statement("MATCH " + generateVertexMatchPattern("n") + " WHERE n." + vertexIdFieldName + " in {ids}" + (predicate != null ? " AND " + predicate : "") + " RETURN n", Values.parameters("ids", filter));
Stream<Vertex> query = vertices(statement);
return combine(identifiers.stream().filter(vertices::containsKey).map(id -> (Vertex)vertices.get(id)), query);
