Skip to content

Instantly share code, notes, and snippets.

View gunnarmorling's full-sized avatar
🤓
Streaming data changes, one at a time.

Gunnar Morling gunnarmorling

🤓
Streaming data changes, one at a time.
View GitHub Profile

Hibernate OGM 4.1.0.Beta1 is out

It's my great pleasure to announce the release of Hibernate OGM 4.1.0.Beta1! This version shines with:

  • support for CouchDB
  • query execution via JPA
  • and much more including a version bump

But wait, hasn't the last released version been 4.0.0.Beta4? That's true indeed, and in case you were wondering, we did not forget to do a final release of the 4.0 line. The reason for the version bump is that Hibernate OGM is now compatible with JPA 2.1 and Hibernate ORM 4.3. To reflect this we thought it'd be a good idea to jump to a new minor version as well.

@Override
public Iterator<Tuple> executeBackendQuery(CustomQuery customQuery, QueryParameters queryParameters, EntityKeyMetadata[] metadatas) {
//e.g. "db.Item.find({ foo : bar })
String query = customQuery.getSQL();
// parse via Parboiled
QueryDescriptor qd = new QueryParser().parse( query );
//qd.collection = "Item"

Hibernate OGM 4.1.0.Beta3 is out, bringing improved support for Neo4j, querying and more

It's my great pleasure to announce the release of Hibernate OGM 4.1.0.Beta3. This release is focused on an improved experience when working with the Neo4j graph datastore and several improvements in the field of querying (the complete change log can be found here).

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.Beta3_ for the OGM engine and
_org.hibernate.ogm:hibernate-ogm-<datastore>:4.1.0.Beta3_, depending on the backend you want to use.

Improved support for Neo4j

@Test
public void foo() throws Exception {
getTransactionManager().begin();
EntityManager em = getFactory().createEntityManager();
// that's committed
Item item = new Item( "To thatch a roof - Ultimate Edition", 10 );
em.persist( item );
getTransactionManager().commit();
@Constraint
public @interface ValidFoo { ... }
@gunnarmorling
gunnarmorling / 4.1.0.Beta6.md
Last active August 29, 2015 14:05
Query improvements and better Neo4j support - Hibernate OGM 4.1.0.Beta6 is out

The Hibernate team is very happy to announce the release of another Beta of Hibernate OGM 4.1!

Progress has been made with respect to query execution and the Neo4j dialect. Also we do provide a so-called "Bill of Materials" POM now which the Maven users out there will appreciate (details below).

The GAV coordinates to be used with Maven, Gradle etc. are:

  • org.hibernate.ogm:hibernate-ogm-core:4.1.0.Beta6 for the OGM engine and
  • org.hibernate.ogm:hibernate-ogm-:4.1.0.Beta6, depending on the backend you want to use.

Alternatively you can fetch a release bundle containing Hibernate OGM and all its dependencies from SourceForge.

@gunnarmorling
gunnarmorling / Actual_Persisted_Format.json
Last active August 29, 2015 14:05
Persisted format of OneToOneTest#testBidirectionalManyToOne() in MongoDB
{
"_id" : "6866afaf-c5ee-4fee-9821-79b2ae2a63b7",
"husband" : [
"ae25fe38-d532-415c-b12a-4c1f0f4782a8"
],
"name" : "Bea"
}
{
"_id" : "ae25fe38-d532-415c-b12a-4c1f0f4782a8",
"name" : "Alex",
@gunnarmorling
gunnarmorling / gist:fa6eb9ab72fff2d5a8d1
Created September 5, 2014 14:19
IMPL types exposed by HSEARCH API/SPIs
[ERROR] my-rules:PublicMethodsMayNotExposeInternalTypes: API/SPI methods must not expose internal types.
[ERROR] method=org.hibernate.search.engine.spi.SearchFactoryImplementor#org.hibernate.search.engine.impl.FilterDef getFilterDefinition(java.lang.String)
[ERROR] method=org.hibernate.search.engine.spi.SearchFactoryImplementor#org.hibernate.search.indexes.impl.IndexManagerHolder getIndexManagerHolder()
[ERROR] method=org.hibernate.search.engine.spi.SearchFactoryImplementor#org.hibernate.search.backend.impl.batch.BatchBackend makeBatchBackend(org.hibernate.search.batchindexing.MassIndexerProgressMonitor)
[ERROR] method=org.hibernate.search.engine.spi.EntityIndexBinding#org.hibernate.search.query.collector.impl.FieldCacheCollectorFactory getIdFieldCacheCollectionFactory()
[ERROR] method=org.hibernate.search.engine.spi.DocumentBuilderIndexedEntity#org.hibernate.search.query.collector.impl.FieldCacheCollectorFactory getIdFieldCacheCollectionFactory()
[ERROR] method=org.hibernate.search.engine.spi.Abs
@Entity
public class Court {
@EmbeddedId
private CourtId id;
private String name;
@OneToMany(mappedBy = "playedOn")
private Set<Game> games = new HashSet<Game>();
private static class OgmPersistEventListener extends DefaultPersistEventListener {
/**
* Performs all the actual work needed to save an entity (well to get the save moved to
* the execution queue).
*
* @param entity The entity to be saved
* @param key The id to be used for saving the entity (or null, in the case of identity columns)
* @param persister The entity's persister instance.
* @param useIdentityColumn Should an identity column be used for id generation?