Skip to content

Instantly share code, notes, and snippets.

Avatar
🤓
Streaming data changes, one at a time.

Gunnar Morling gunnarmorling

🤓
Streaming data changes, one at a time.
View GitHub Profile
View ogm-4.1.0.Beta1-released.md

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.

View gist:c4a4826b6e7c11615a72
@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"
View 4.1.0.Beta3.md

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

View jpa_several_tx.java
@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();
View 1_ValidFoo
@Constraint
public @interface ValidFoo { ... }
@gunnarmorling
gunnarmorling / 4.1.0.Beta6.md
Last active Aug 29, 2015
Query improvements and better Neo4j support - Hibernate OGM 4.1.0.Beta6 is out
View 4.1.0.Beta6.md

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 Aug 29, 2015
Persisted format of OneToOneTest#testBidirectionalManyToOne() in MongoDB
View Actual_Persisted_Format.json
{
"_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 Sep 5, 2014
IMPL types exposed by HSEARCH API/SPIs
View gist:fa6eb9ab72fff2d5a8d1
[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
View Court.java
@Entity
public class Court {
@EmbeddedId
private CourtId id;
private String name;
@OneToMany(mappedBy = "playedOn")
private Set<Game> games = new HashSet<Game>();
View OgmPersistEventListener.java
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?
You can’t perform that action at this time.