Going from Hibernate to OrientDb, have several questions

598 views
Skip to first unread message

Kamen Ivanov

unread,
Feb 22, 2015, 2:20:54 PM2/22/15
to orient-...@googlegroups.com
Hello everyone, I'm a Java guy who's been working with hibernate for 2 years now, but now i'm starting to work on a project where the ordinary relational database wont help me much, so I've decided to use OrientDB. I have several questions:
1. Is there any API for mapping my entities to the orientDB (as the hibernate mapping files where I describe my entity), if i can use XML again would be awesome
2. Except for the very good documentation on the OrientDb site, I couldn't find good Java examples in the internet and forums, may be you can suggest me some?
3. I see that hmm you can create vertices and edges using Java such as graph.addVertex("class:Person"), that's great but what if (and I want to) extend some class or implement some interface so i can create my custom Vertex / Edge and have control over them? I couldn't find something about that too.

For example lets say i have interface Person, but also i want to have an implementation of Person, where i can validate data and some other stuffs, in other words:

Person p = new PersonImpl("some", "args"); // Create the person with my own implementation
graph.addVertex(p); // save the very same person in the graph database
Person loadedP = graph.getVertexById(1); // load the person using its ID (or RID, sorry i'm used to call it id)

I'll appreciate any help from you guys, thank you for the attention and have a great day :)

Luigi Dell'Aquila

unread,
Feb 23, 2015, 9:48:58 AM2/23/15
to orient-...@googlegroups.com
Hi Kamen,

did you check TinkerPop frames? https://github.com/tinkerpop/frames/wiki 
I think it's what you are looking for

Regards

Luigi

--

---
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.
For more options, visit https://groups.google.com/d/optout.

Kamen Ivanov

unread,
Feb 23, 2015, 4:51:13 PM2/23/15
to orient-...@googlegroups.com
Yes, I did see this and I saw several examples but as far as i can see, TinkerPop Frames provides just annotations for interfaces, I cannot put some validation of the data in the POJO it self except of using the JavaHanlder annotation to proxy the call to my POJO's method. Thanks for the answer, I'll keep looking. :)

Vitor Enes Duarte

unread,
Feb 24, 2015, 6:33:28 AM2/24/15
to orient-...@googlegroups.com
Hi,

It's possible to work with detached objects using frames?
Reply all
Reply to author
Forward
0 new messages