Using the new OGM Neo4j 2.3. When I try to load objects by id, I have the following problem:
@NodeEntity class Person { Long id; String name; @Relationship(type="Friend", direction = Direction.OUTGOING) public List<Person> friends; }
Assuming (1, "Alex") is friends with (2, "Joseph") and (3, "Guy") , (4, "Nati") is friends with (5, "Amit") , using the following code:
session.loadAll (Person.class, Arrays.toList (new Long () {1L, 4L}), 1)
should return 2 objects of Person, Alex, containing two friends (Guy, Joseph) and Nati, containing one friend, but what he actually returns is 5 objects (Alex, Guy, Joseph, Nati, Amit). Although Mike and Nati keep their friends inside, it seems strange (and, of course, undesirable) that I asked Faces with two identifiers and got an Iterable containing 5. Does anyone know why this is? this is mistake?
source share