We have to work on a JPA-based project using Hibernate. For now, it is running on the default H2 database, with the default H2 dialect.
We would like to migrate our project on a triplestore database, such as OpenRDF Sesame.
I was wondering if the best way is to find/create a custom dialect for OpenRDF? Possible? Or if we have to stop using Hibernate?
I am quite new in Hibernate dialect but I saw some custom ones... So, is it possible to create one for triplestore database?
You might try using Empire which is an implementation of JPA for RDF & SPARQL, as opposed to RDBMS & SQL.
Empire is API agnostic, so you can easily use any Sesame or Jena API compatible database with it, which requires only changes to configuration. It should be pretty straightforward to implement support for other providers.
It doesn't cover all of JPA, there's some mismatch between parts which is currently omitted, but the basics are covered. There are a few RDF specific annotations you'd need to include to make an existing Hibernate implementation work, but it should be an easy transition.
I've done a migration via Empire from an RDBMS to Sesame in the past, including a step where I was persisting to both, and it went quite well.
(disclaimer, I'm the author of Empire)