Skip to content

1.11.0

Compare
Choose a tag to compare
@michael-simons michael-simons released this 12 Sep 10:59
· 976 commits to main since this release
adbcac0

What's Changed

This release contains the second Java annotation processor I wrote and I am very excited about it: You can point this tool from within Javac to entities annotated with Neo4j-OGM OR Spring Data Neo4j 6 annotations and it will produce catalog files containing the indexes and constraints that can be derived by the annotated classes.

All indexes and constraints of the Neo4j-OGM auto index manager and all SDN6 annotations are supported. The annotation processor does not ship the dependencies itself, so one possible invocation looks like this:

javac -proc:only \
-processorpath neo4j-migrations-1.11.0.jar:neo4j-migrations-annotation-processor-api-1.11.0.jar:neo4j-migrations-annotation-processor-1.11.0.jar \
-Aorg.neo4j.migrations.catalog_generator.output_dir=output \
-Aorg.neo4j.migrations.catalog_generator.default_catalog_name=V01__Create_OGM_schema.xml \
-cp neo4j-ogm-core-3.2.37.jar \
path/to/annotated/entities/*

Please have a look at "Annotation processing" in the manual how to run this for SDN6 and possible ways to integrate it into your build.

One possible output - outlining just some of the constraints - will look like this

<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<migration xmlns="https://michael-simons.github.io/neo4j-migrations">
  <!-- This file was generated by Neo4j-Migrations at 2022-09-21T21:21:00+01:00. -->
  <catalog>
    <indexes>
      <index name="my_entities_ogm_singleindexentity_login_property" type="property">
        <label>Entity</label>
        <properties>
          <property>login</property>
        </properties>
      </index>
      <index name="my_entities_ogm_relpropertyindextentity_description_property" type="property">
        <type>RELPROPERTYINDEXTENTITY</type>
        <properties>
          <property>description</property>
        </properties>
      </index>
      <index name="my_entities_ogm_compositeindexentity_name_age_property" type="property">
        <label>EntityWithCompositeIndex</label>
        <properties>
          <property>name</property>
          <property>age</property>
        </properties>
      </index>
    </indexes>
    <constraints>
      <constraint name="my_entities_ogm_entitywithassignedid_id_unique" type="unique">
        <label>EntityWithAssignedId</label>
        <properties>
          <property>id</property>
        </properties>
      </constraint>
      <constraint name="my_entities_ogm_nodepropertyexistenceconstraintentity_login_exists" type="exists">
        <label>Entity</label>
        <properties>
          <property>login</property>
        </properties>
      </constraint>
      <constraint name="my_entities_ogm_relpropertyexistenceconstraintentity_description_exists" type="exists">
        <type>REL</type>
        <properties>
          <property>description</property>
        </properties>
      </constraint>
      <constraint name="my_entities_ogm_nodekeyconstraintentity_name_age_key" type="key">
        <label>Entity</label>
        <properties>
          <property>name</property>
          <property>age</property>
        </properties>
      </constraint>
    </constraints>
  </catalog>
  <apply/>
</migration>

This catalog can than be added to your CI/CD or application setup as described in the manual. We do not recommend regenerating it every time in the build as that will break the chain of migrations once you change entities. This might be seen as an inconvenience but we are convinced that a half-automated process here is better than the auto index manager of old that might surprises you with it's upgrade mechanism.

This also the first release that that will ship with Linux ARM64 ootb.

While we did bump the minor version, there are no breaking changes.

🚀 Features

  • 771124c Add annotation processor for Neo4j-OGM and SDN6 entities. (#618)

🐛 Bug Fixes

🔄️ Refactorings

  • 9c58ec5 Use Cypher-DSL schema name support for sanitizing names. (#620)

📝 Documentation

  • fb4ca38 add fbiville as a contributor for ideas (#638)
  • e8a71cd add ali-ince as a contributor for userTesting (#637)
  • 59fea88 add atomfrede as a contributor for ideas (#636)
  • 1b52cf9 add katya-dovgalets as a contributor for code (#635)
  • 6791e62 add corneil as a contributor for bug (#634)
  • d141781 add marianozunino as a contributor for ideas (#633)
  • fd4b41c add aalmiray as a contributor for code, plugin, ideas, mentoring (#632)
  • a11f2fc add Dcanzano as a contributor for userTesting, bug (#631)
  • 3b02732 add Hosch250 as a contributor for userTesting, bug (#630)
  • 832f503 add injectives as a contributor for code, userTesting (#629)
  • 1807f29 add SeanKilleen as a contributor for doc (#628)
  • 22cf9b7 add ali-ince as a contributor for bug (#627)
  • 1fadb5d add michael-simons as a contributor for maintenance (#626)
  • 2062be5 add michael-simons as a contributor for code, doc (#625)
  • 4aebc75 add meistermeier as a contributor for doc (#624)
  • 99b9f60 add bsideup as a contributor for review (#623)
  • e5e89ce add meistermeier as a contributor for code (#622)
  • 897be21 Update local changelog.

🧹 Housekeeping

  • 1a7b7b3 Bump neo4j-harness from 4.4.10 to 4.4.11 (#642)
  • 91266e4 Bump error_prone_annotations from 2.12.1 to 2.15.0 (#643)
  • 2af5eaa Bump byte-buddy.version from 1.12.14 to 1.12.16 (#644)
  • 4e1bf2f Bump checker-qual from 3.24.0 to 3.25.0 (#641)
  • 8ef853e Bump mockito.version from 4.7.0 to 4.8.0 (#639)
  • c2b6c6f Bump quarkus-neo4j.version from 1.4.1 to 1.5.0
  • a3ade49 Bump quarkus.version from 2.12.0.Final to 2.12.1.Final
  • e783d4d Bump japicmp-maven-plugin from 0.15.7 to 0.16.0 (#617)
  • dde32a3 Bump quarkus.version from 2.11.2.Final to 2.12.0.Final (#611)

🛠 Build

  • 165bcb8 Add linux-aarch_64 to the release pipeline. (#645)
  • d8d1dfe Add all-contributors bot.