I'm trying to create a starter OrientDB project using Spring and
ObjectQuery-orientDB but I'm having trouble understanding the relationship between OObjectDatabaseTx and OrientGraphFactory and how should I go about setting my project. I usually use Hibernate or Spring data to query & modify the database.
Is it a good practice to use them both (OObjectDatabaseTx and OrientGraphFactory) in a same project for a same Graph database ?
I was thinking of using the OObjectDatabaseTx class to do Select and Update operation on the Vertices and Edges.
Eg: update Customer name, email etc
and use
Objectquery-orientdb library for query operations. This library only uses OObjectDatabaseTx to generate queries.
Is having connections defined as following as Spring configuration beans a good practice ?
OrientGraphFactory graphFactoryBean = new OrientGraphFactory("remote:database", "root", "root");
OObjectDatabaseTx objectDatabaseBean = new OObjectDatabaseTx("remote:localhost/database").open("root", "root");
Does this mean that my application will have two different connections to the database ?