JIRA issue created: https://jira.springsource.org/browse/DATAGRAPH-188
Regards,
Daniel
Printable View
JIRA issue created: https://jira.springsource.org/browse/DATAGRAPH-188
Regards,
Daniel
Not adding much to this thread. But Daniel, I highly recommend overriding equals and hashCode in domain objects. Because the default implementation is via ==, which is memory address. So theoretically you could have two domain objects that data wise are the same domain objects, but are two different objects in the heap, and therefore equals will return false.
While this isn't JPA or Hibernate here, it was required to override equals and hashCode because the apis underneath the querying would use it to make sure it never created two different instances with the same data from the db.
Especially since these methods are used extensively in Collections, which with data models like we have will have plenty Collections to work with.
Hope that helps
Mark
Mark, Daniel,
if you want to add anything to the docs, please just fork the project edit the xml in the src/docbk directory and issue a pull request. Thanks a lot.
Michael
Unfortunatly, I'm having this issue. I have these seperations made (of the MVC controllers), I have the correct entry for <tx:annotation-driven mode="proxy" />, and have tried the others in this thread. But in my service, I get this exception. No issues with my tests, just actual code. It's just not getting wrapped in a transaction.
But your service is injected into your controllers?
Yes, they are.
Any chance to share the project / a sample project to look at?
If you get your service injected elsewhere or pull it directly from the context (e.g. in a single Main class), does the transaction work then?
The transactions only work if they are in the classes the services call, which is how I've been working around this. So both the service injection & transaction injection work, just not in the same classes.
I'll see about creating a sample project to show this; I have one I've used to demonstrate several other defects in the NEO4j code, so maybe it can be easily modified.