It's my pleasure to announce a new release of Hibernate OGM.
Hibernate OGM can now convert JP-QL queries into cypher queries when working with Neo4j. We improved the JSON representation used for associations in CouchDB and MongoDB making it more concise. We also worked on several bug fixes and improvements under the hood, you can read more about it in the release note.
As always, you can either download a release bundle from SourceForge or retrieve the JARs from the JBoss Nexus repository server using Maven, Gradle etc. The GAV coordinates are:
- org.hibernate.ogm:hibernate-ogm-core:4.1.0.Beta5 for the OGM engine and
- org.hibernate.ogm:hibernate-ogm-<datastore>:4.1.0.Beta5, depending on the backend you want to use.
From JP-QL to Cypher
For example, if you execute the following JP-QL query:
from Hypothesis h where h.author IN ('alma', 'alfred')
OGM will execute the following Cypher query on Neo4j:
MATCH (h:Hypothesis) WHERE ANY(_x_ IN ["alma", "alfred"] WHERE h.author = _x_) RETURN h
The following subset of JP-QL constructs is available at the moment:
- simple comparisons
- IS NULL and IS NOT NULL
- the boolean operators AND, OR, NOT
- LIKE, IN and BETWEEN
- ORDER BY
More natural mapping for associations in MongoDB and CouchDB
In the previous releases, an entity with an association looked something like the following JSON:
{
"_id": "4f5b48ad",
...
"rows": [
{
"bankAccounts_id": "7873a2a7"
}
]
}
We got rid of the name of the id in the rows
field, this will now look like:
{
"_id": "4f5b48ad",
...
"rows": [
{
"7873a2a7"
}
]
}
What's next?
Some work on the Neo4j side is still required to make the mapping of the entities more natural. We also want to add caching in several places to improve performance (OGM-541, OGM-515, OGM-522).
We are also discussing about a solution for the generation of error reports with the failed operations on non-transactional db.
You're very welcome to raise your voice on the mailing list, ask questions in the forum or report any bugs or feature requests in the issue tracker.