Announcement Announcement Module
No announcement yet.
Spring Data Neo4j 2.1.0.M1 Released Page Title Module
Move Remove Collapse
This topic is closed
Conversation Detail Module
  • Filter
  • Time
  • Show
Clear All
new posts

  • Spring Data Neo4j 2.1.0.M1 Released

    Dear Spring-NOSQL Community,

    Since the last release of Spring Data Neo4j we worked on a number of issues that you raised as important improvements and extensions.

    Thanks to Mark Spitzler, Oliver Gierke, Rajaram Ganeshan, Laurent Pireyn for their contributions
    and all the other community members for the feedback and discussions.

    We want to encourage you to give it a try, especially the new things and give us your feedback.

    We are aware of the plenthora of issues that are still open and want to address them by the 2.1 release which is planned for the end of March -
    aligned with Neo4j 1.7.

    If you have any questions or suggestions don't hesitate to ask here on the Spring Forums, the Neo4j Google Group or by raising an issue in JIRA.

    Please also check out the Spring Data Neo4j Guidebook on InfoQ. It is available as PDF and ePUB and soon also in print.


    Changes in version 2.1.M1 (2012-03-02)

    * DATAGRAPH-181 added support for unique entities with template.getOrCreateNode and @Indexed(unique=true)
    * DATAGRAPH-198 added support for custom target type, e.g. storing a Date converted to a Long @GraphProperty(propertyType=Long.class)
    * DATAGRAPH-102 fixed type representation in graph with support for @TypeAlias to allow shorter type-identifiers in the graph
    * DATAGRAPH-204 pom.xml cleanup (repositories) and dependency to SFW is now range from 3.0.7.RELEASE - 3.2
    * DATAGRAPH-185 cypher queries for single fields return null on no results
    * DATAGRAPH-182 allow @RelatedTo on Single RelationshipEntity fields + internal refactorings
    * DATAGRAPH-202 provide a getRelationshipsBetween() method in Neo4jTemplate
    * GH-#34 Fix for using Neo4j High-Availability
    * DATAGRAPH-176 Added debug log output for cypher and gremlin query as well as derived query methods
    * DATAGRAPH-186 default value for readonly relationship collections
    * DATAGRAPH-173 fixed verify method for interfaces, added interface support for type-representation strategies
    * DATAGRAPH-169 Backquoting all variable parts of derived finder queries to accommodate for non-identifier names.
    * DATAGRAPH-164 Added methods to determine stored java type to neo4j-template and crud-repository
    * DATAGRAPH-166 fixed multiple sort parameters
    * documentation updates

  • #2
    @Indexed(unique=true) usage

    I noticed that the @Indexed(unique=true)feature works fine with;

    (meaning that if i 2 nodes with different properties but same property marked with the @Indexed(unique=true) annotation, it just updates the first user's properties and does not create a duplicate node...wich is exactlly what i am looking for)

    but i read in the documentation that i should use it with template.getOrCreateNode(takes 4 parameters);
    why is that? should i replate the with template.getOrCreateNode(takes 4 parameters)?
    if so, give me a usage example because i can't seem to figure out those 4 parameters.



    • #3
      @Indexed(unique=true) problem

      I have a problem using @Indexed(unique=true).

      I have a User class with @Indexed(unique=true) String uniqueId; and String name; and i save it.

      Then if another user has refference to the first user's uniqueId in his list of friends, when the FRIEND relationship is created, the name property of the first user vanishes. (is they have many properties, they all vanish).

      How do i fix this?


      • #4
        Spring-Data neo4j configuration


        I'm trying to develop a test with spring-data neo4j and I'm trying to insert to set neo4j mapped files. I'm searching some way to do this. I try to create a applicationContext.xml with this bean:

        <bean id="graphDatabaseService" class="org.neo4j.kernel.EmbeddedGraphDatabase"
        destroy-method="shutdown" scope="singleton">
        <constructor-arg value="target/db/graph.db" />
        <entry key="use_memory_mapped_buffers" value="true" />
        <entry key="cache_type" value="none" />
        <entry key="neostore.nodestore.db.mapped_memory" value="10M" />
        <entry key="neostore.propertystore.db.mapped_memory" value="40M" />
        <entry key="neostore.relationshipstore.db.mapped_memory"
        value="2G" />
        <entry key="neostore.propertystore.db.index.keys.mapped_m emory"
        value="5M" />
        <entry key="neostore.propertystore.db.index.mapped_memory "
        value="5M" />
        <entry key="neostore.propertystore.db.strings.mapped_memo ry"
        value="1M" />
        <entry key="neostore.propertystore.db.arrays.mapped_memor y"
        value="0M" />

        and also generating a graph.db file with properties inside.

        How can I do this? Thank you!


        • #5

          SQL is for RDBMSes, for Neo4j we have Cypher:

          Start there.



          • #6
            Hi Michael,

            do you have any idea when the next release based on neo4-j 1.8.x will be available?

            Currently I'm working on a productive solution based on neo4j 1.8 and I would love to use spring data in the future.

            Best regards,


            • #7

              The latest RC is compatible with Neo4j 1.8:


              The release should be only a couple of weeks away now.



              • #8
                Are there plans to include support for the latest version of Gremlin (v. 2.1.0)?

                When trying to run a Gremlin query using 2.1.0 it fails with a java.lang.NoClassDefFoundError: com/tinkerpop/blueprints/pgm/Vertex because of a refactor of the Gremlin library that moved everything in com.tinkerpop.blueprints.pgm to com.tinkerpop.blueprint.


                • #9
                  SDN 2.1.RC3 was available in early August.


                  • #10
                    Don't know, as Neo4j has not been updated to use Gremlin 2.x (due to the many changes and lack of uptake) we will probably stick to that version.

                    You can probably upgrade it yourself in your pom and excluding the dependencies from spring-data-neo4j.


                    • #11
                      Sorry, I should have stated that I was using RC3. I wanted to post this question in a thread related to that release but couldn't find one.

                      I'm not sure I'm following. I can use the latest version of Gremlin and the Gremlin console to issue queries against Neo4j v. 1.8.M07 (using some features introduced in 2.x) without problem so Neo4j seems to support it.

                      Also, what I want to do is to issue queries using Gremlin from within SDN in order to get domain objects back which I assume will be a lot more complicated if I have to do it without the query support of SDN.

                      In any case, thanks for the response. I will look into alternative ways to solve my problem now that I know that Gremlin 2.x won't be supported in the near future.


                      • #12
                        Maybe just a little bit more clarification about dependencies with TinkerPop Gremlin:
                        When I try to issue this Gremlin query:

                        @Query(value = "g.v(0).out('knows')", type = QueryType.Gremlin)
                        Iterable<User> findAllFriendsByName(@Param("fullName") String name);

                        I get this error message:
                        java.lang.IllegalStateException: Gremlin is not available, please add it to your dependencies to execute: g.v(0).out('knows')
                        at raphDatabase$FailingQueryEngine.query(DelegatingGr
                        at aphRepositoryQuery.dispatchQuery(GraphRepositoryQu
                        at aphRepositoryQuery.execute(GraphRepositoryQuery.ja va:70)
                        at epositoryFactorySupport$QueryExecutorMethodInterce ptor.invoke(
                        at org.springframework.aop.framework.ReflectiveMethod Invocation.proceed( :172)
                        at org.springframework.transaction.interceptor.Transa ctionInterceptor.invoke(TransactionInterceptor.jav a:110)
                        at org.springframework.aop.framework.ReflectiveMethod Invocation.proceed( :172)
                        at onTranslationInterceptor.invoke(PersistenceExcepti
                        at org.springframework.aop.framework.ReflectiveMethod Invocation.proceed( :172)
                        at org.springframework.aop.framework.JdkDynamicAopPro xy.invoke(
                        at $Proxy32.findAllFriendsByName(Unknown Source)
                        at test.Tester.shouldRetrieveAUserKnownFriends(Tester .java:75)
                        at sun.reflect.NativeMethodAccessorImpl.invoke0(Nativ e Method)
                        at sun.reflect.NativeMethodAccessorImpl.invoke(Unknow n Source)
                        at sun.reflect.DelegatingMethodAccessorImpl.invoke(Un known Source)
                        at java.lang.reflect.Method.invoke(Unknown Source)
                        at org.junit.runners.model.FrameworkMethod$1.runRefle ctiveCall(
                        at org.junit.internal.runners.model.ReflectiveCallabl
                        at org.junit.runners.model.FrameworkMethod.invokeExpl osively(
                        at org.junit.internal.runners.statements.InvokeMethod .evaluate(
                        at org.junit.internal.runners.statements.RunBefores.e valuate(
                        at org.springframework.test.context.junit4.statements .RunBeforeTestMethodCallbacks.evaluate(RunBeforeTe
                        at org.junit.internal.runners.statements.RunAfters.ev aluate(
                        at org.springframework.test.context.junit4.statements .RunAfterTestMethodCallbacks.evaluate(RunAfterTest
                        at org.springframework.test.context.junit4.statements .SpringRepeat.evaluate(
                        at org.springframework.test.context.junit4.SpringJUni t4ClassRunner.runChild(SpringJUnit4ClassRunner.jav a:231)
                        at org.junit.runners.BlockJUnit4ClassRunner.runChild(
                        at org.junit.runners.ParentRunner$ java:193)
                        at org.junit.runners.ParentRunner$1.schedule(ParentRu
                        at org.junit.runners.ParentRunner.runChildren(ParentR
                        at org.junit.runners.ParentRunner.access$000(ParentRu
                        at org.junit.runners.ParentRunner$2.evaluate(ParentRu
                        at org.springframework.test.context.junit4.statements .RunBeforeTestClassCallbacks.evaluate(RunBeforeTes
                        at org.springframework.test.context.junit4.statements .RunAfterTestClassCallbacks.evaluate(RunAfterTestC
                        at va:236)
                        at org.springframework.test.context.junit4.SpringJUni )
                        at org.eclipse.jdt.internal.junit4.runner.JUnit4TestR
                        at org.eclipse.jdt.internal.junit.runner.TestExecutio
                        at org.eclipse.jdt.internal.junit.runner.RemoteTestRu nner.runTests(
                        at org.eclipse.jdt.internal.junit.runner.RemoteTestRu nner.runTests(
                        at org.eclipse.jdt.internal.junit.runner.RemoteTestRu
                        at org.eclipse.jdt.internal.junit.runner.RemoteTestRu nner.main(

                        This is my (probably messed up) pom.xml:

                        <project xmlns="" xmlns:xsi=""


                        • #13
                          Can you please post this in a separate thread.