-
-
Notifications
You must be signed in to change notification settings - Fork 94
Closed
Milestone
Description
(This issue comes from the Discord channel)
Step to reproduce it
public void saveLibrary() {
try (RemoteDatabase database = new RemoteDatabase("localhost", 2480, "testdb", "root", "playwithdata")) {
Person personOne = new Person();
personOne.setPersonId(UUID.randomUUID().toString());
personOne.setName("personOne");
LibraryModel library = new LibraryModel();
library.setLibraryId(UUID.randomUUID().toString());
library.setName("library");
library.setLibraryPerson(List.of(personOne));
MutableVertex libraryVertex = database.newVertex("Library");
libraryVertex.set("libraryId", library.getLibraryId(), "name", library.getName());
libraryVertex.save();
MutableVertex personOneVertex = database.newVertex("Person");
personOneVertex.set("personId", personOne.getPersonId(), "name", personOne.getName());
personOneVertex.save();
libraryVertex.newEdge("HavePerson", personOneVertex, false);
}
}This is a very simple example. I created two classes and made a small scheme that run immediately when the application starts
create vertex type Library if not exists;
create property Library.libraryId if not exists string;
create property Library.name if not exists string;
create edge type HavePerson if not exists;
create vertex type Person if not exists;
create property Person.personId if not exists string;
create property Person.name if not exists string;Reactions are currently unavailable