Search in sources :

Example 1 with DomainObject

use of org.neo4j.ogm.domain.education.DomainObject in project neo4j-ogm by neo4j.

the class LoadCapabilityTest method loadAllByInstancesShouldLoadAllClasses.

@Test
public void loadAllByInstancesShouldLoadAllClasses() {
    SessionFactory sf = new SessionFactory(getDriver(), "org.neo4j.ogm.domain.education");
    Session sessionWithEducationDomain = sf.openSession();
    School school = new School();
    Student student = new Student();
    sessionWithEducationDomain.save(school);
    sessionWithEducationDomain.save(student);
    Collection<DomainObject> loaded = sessionWithEducationDomain.loadAll(Arrays.asList(school, student));
    assertThat(loaded).contains(school, student);
}
Also used : SessionFactory(org.neo4j.ogm.session.SessionFactory) School(org.neo4j.ogm.domain.education.School) DomainObject(org.neo4j.ogm.domain.education.DomainObject) Student(org.neo4j.ogm.domain.education.Student) Neo4jSession(org.neo4j.ogm.session.Neo4jSession) Session(org.neo4j.ogm.session.Session) Test(org.junit.Test)

Aggregations

Test (org.junit.Test)1 DomainObject (org.neo4j.ogm.domain.education.DomainObject)1 School (org.neo4j.ogm.domain.education.School)1 Student (org.neo4j.ogm.domain.education.Student)1 Neo4jSession (org.neo4j.ogm.session.Neo4jSession)1 Session (org.neo4j.ogm.session.Session)1 SessionFactory (org.neo4j.ogm.session.SessionFactory)1