Announcement Announcement Module
Collapse
No announcement yet.
Last Cross store question Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • Last Cross store question

    So, I am at the point where I think I have to move on. It is weird, I can't get it to work, or to figure things out on cross stores.

    So do I have Repository and @EnableJpaRepositories if I am using AspectJ and SDN Cross Store, or should it just be the active record approach. With the Active Record approach and no Repository, how do I create simple queries like find by one of the properties of the domain object, like derived queries in a Repo.

    I ask because in my Spock unit test, I have a save new object and find data tests, and if I go with one or the other approach with or without repos, I get different types of errors. If I have a repo, then the save, which goes through active record and not the repo will fail saying there is no Transaction running even though the test method has @Transactional. If I don't have a repo, then the save new object test passes, but the find test fails because it doesn't have a repo to do a findByFirstName derived query.

    I have a couple more hours I can spend on this. Already spent the past 2 weeks off and on on cross store, and I have to move on. Which means I have to decide with cross store, or just two separate domain objects and repos. (If this was my own personal project I would have more time to get it to work)

    Thanks

    Mark

  • #2
    In the end, I had to stop trying to get cross store to work. I have now split it into two separate domain objects. One that uses the Neo4J stored data and one for the JPA data. And I am now going to manually store the nodeId in the RDBMS table for the user, for the connection between the two.

    In the end, as a contractor, I am hired at a rate that I can't see charging for a week worth of work not getting any progress.

    I tried running the examples on cross store. Lasse's crossstore github project as well as those that come in the SDN github project, and running them on their own would work, but I also noticed the configurations were vastly different. None used Java Based Config, and one didn't really use Spring Data Repositories, instead implemented the Repository completely with JPA code.

    Thanks for all your help to try to figure out what was so wack about my project.

    Mark

    Comment


    • #3
      Somehow i feel your pain, though I'm still only trying to set it up for three days with java configuration. But it seems likely that i will go your way and use to separate domain objects.

      Since more than six months have passed since your post, do you have any feedback from your approach that you could share? The do's and dont's?

      Would greatly appreciate it! Thanks!

      Comment


      • #4
        Well, just keep them separated, which means the domain objects and the repositories need to be in different packages so that any package type scan for Spring Data repositories won't find both at the same time.

        Spring Data JPA more so because it likes to grab everything even Spring Data Neo4J domain objects and try to map them to RDBMS tables.

        Mark

        Comment

        Working...
        X