Jan 18th, 2013, 03:14 PM
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)
Jan 21st, 2013, 06:56 PM
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.