OgmSession session = openSession();
Transaction tx = session.beginTransaction();
// given
EntityWithObjectIdAndEmbeddable entity = new EntityWithObjectIdAndEmbeddable();
AnotherEmbeddable anotherEmbeddable = new AnotherEmbeddable( "Another nice string ... nested" );
AnEmbeddable anEmbeddable = new AnEmbeddable( "a very nice string", anotherEmbeddable );
entity.setAnEmbeddable( anEmbeddable );
// when
session.persist( entity );