Storing a POJO as/in vertex

936 views
Skip to first unread message

Tuhin Sengupta

unread,
Jul 31, 2019, 11:14:30 AM7/31/19
to OrientDB
Hi all,

I am using OrientDB 3.0.
Now, Orient API's allow saving POJO's using simple API as follows:

Animal animal = new Animal();
animal
.setName("Gaudi");
animal
.setLocation("Madrid");
animal
= db.save(animal);
Orient stores the object and serializes/de-serializes it while saving/fetching.

Is it possible for a user to use this in-built serialization/de-serialization while using the graph model of Orient DB?
In other words, is it possible for a user to have POJO saved as/in a vertex instead of a document?

Regards,
Tuhin

Marek Bisz

unread,
Aug 1, 2019, 10:49:37 AM8/1/19
to orient-...@googlegroups.com
As far as I remember - It was enough to inherit from "V" class.

So I just created empty POJO V class on implementation side

--

---
You received this message because you are subscribed to the Google Groups "OrientDB" group.
To unsubscribe from this group and stop receiving emails from it, send an email to orient-databa...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/orient-database/ef25f9e3-8e55-42c3-a3c2-7a3cdfefb70c%40googlegroups.com.

Tuhin Sengupta

unread,
Aug 6, 2019, 5:06:05 AM8/6/19
to OrientDB
Thanks Marek, thats one way to go. But that stops me from inheriting any other class. Since OrientDB has simple API's to store a POJO, I was hoping for a much scalable solution.


On Thursday, August 1, 2019 at 8:19:37 PM UTC+5:30, Marek Bisz wrote:
As far as I remember - It was enough to inherit from "V" class.

So I just created empty POJO V class on implementation side

śr., 31 lip 2019 o 17:14 Tuhin Sengupta <tuhin...@gmail.com> napisał(a):
Hi all,

I am using OrientDB 3.0.
Now, Orient API's allow saving POJO's using simple API as follows:

Animal animal = new Animal();
animal
.setName("Gaudi");
animal
.setLocation("Madrid");
animal
= db.save(animal);
Orient stores the object and serializes/de-serializes it while saving/fetching.

Is it possible for a user to use this in-built serialization/de-serialization while using the graph model of Orient DB?
In other words, is it possible for a user to have POJO saved as/in a vertex instead of a document?

Regards,
Tuhin

--

---
You received this message because you are subscribed to the Google Groups "OrientDB" group.
To unsubscribe from this group and stop receiving emails from it, send an email to orient-...@googlegroups.com.
Reply all
Reply to author
Forward
0 new messages