Syncleus / Ferma

An ORM / OGM for the TinkerPop graph stack.

Home Page:http://syncleus.com/Ferma

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

[BOUNTY $50] Create a Ferma-examples project

freemo opened this issue · comments

Create a Ferma-examples project including various usage examples. There should be a collection of very simple hello-world example projects showing off all of Ferma's features. There should also be an example project for each major graph DB and how Ferma can work with it. Ideally these should run in-memory through maven but when this isnt possible perhaps throw in some vagrant images as well.

A good point to start would be to migrate the following Ferma 2.x examples: https://github.com/Jotschi/graph-ogm-examples/tree/master/ferma

Hey guys, I'm working on trying to integrate Ferma with OrientDB in our company's product. I'd be happy to help build out an example using orientdb if someone can help me understand why I get NullPointer exceptions using annotation based traversals as is laid out in the current Readme.md

@deepthought42 Using Ferma with OrientDB should be no problem. We use it with OrientDB 2.2.x gentics/mesh - I also build an example to use it with the Tinkerpop 3.x API. https://github.com/Jotschi/vertx-graphql-example

An example using the new OrientDB 3.0.1 release / Graph API would be welcome I guess.

I feel like a shmuck. I had been battling this problem all day and simply spinning up a fresh database server seems to have fixed the problem. I definitely appreciate how quick you guys were at getting back.

@Jotschi I found the project interesting. I haven't heard of gentics/mesh before but it looks like a really cool project. I'll definitely be digging into it and your example a bit more.

I still plan to put together an example of how I used ferma with orientdb, if that's something you still need.

@deepthought42 Make sure to use OrientDB 3.0.1 and the new Graph API - https://orientdb.com/docs/3.0.x/release/3.0/What-is-new-in-OrientDB-3.0.html#new-database-administration-access-and-pooling-api - As well as Tinkerpop 3.x - I would be interested in an example. I have not yet had time to test TP 3 support of OrientDB 3.0.0 although the vertx-graphql-example is already using TP3 using an OrientDB 3.x milestone release

@Jotschi not a problem. I'm well on my way with it. I have run into a slight problem though. With OrientDB 3.0.1, and the latest maven releases for ferma and ferma-orientdb I ran into the issue that everything executes correctly, but nothing actually gets saved to the database when I use OrientTransactionFactoryImpl. Oddly enough, if I use DelegatingFramedGraph everything saves without issue. Have you experienced this issue before? There's nothing in the ferma-orientdb codebase that stands out to me as problematic. The only thing I can think of is maybe it has something to do with the transaction wrapper, but I'm not familiar enough with the code to be sure.

@deepthought42 No that does not ring a bell.. sorry. I just know that the transaction handling has been touched in OrientDB 3.x Maybe that had an effect on the implementation. Some transaction handlers may require you to actively invoke tx.success(); Otherwise close() for try-with-resouces will not invoke commit(). I hope that I will soon have some time to work on the migration to OrientDB 3.x for Gentics Mesh. Tests are already looking great but I still have some issues with clustering.

@Jotschi I ran into another issue when putting together examples. I generally like having an example for every way a tool can be used, so I started creating examples using abstract classes, interfaces and concrete classes. For some reason using annotations with concrete classes will allow me to save a vertex, but it won't save any of the properties or create edges for an adjacency. Have you experienced this before?

No problem the repo can be found here. https://github.com/deepthought42/orientdb3-ferma

I'm not entirely sure where the problem is. As I said, it's not saving the properties on the concrete class. The peculiar thing to me is that my test passes as if the property were there.

https://github.com/deepthought42/orientdb3-ferma/blob/af601c4607b8e4070fa717e1059cd7b76cba37e4/src/test/java/qanairy/orientdb_ferma/TraversalTests.java#L30

I would expect that line to fail instead of passing since I'm not seeing the name property on the Pet vertex in the database.