2

Does anyone know if the Database.com Java SDK has an equivalent of Hibernate's OpenSessionInView (or has anyone created their own)?

I keep getting javax.jdo.JDODetachedFieldAccessException's in my JSP's when referencing my lazy relationships and I'd prefer not to manually load the relationships in the code.

Thanks, Brad

mmix
  • 6,057
  • 3
  • 39
  • 65
Brad
  • 43
  • 4

2 Answers2

2

I haven't tried this myself, but maybe this would work for you? http://blog.smartkey.co.uk/2010/03/open-session-in-view-pattern-spring-jpa/

j_simone
  • 558
  • 2
  • 6
  • Thanks this helped point me to the right direction. I used the following interceptor which seems to be working a treat! ` ` – Brad Feb 26 '12 at 21:22
0

Don't know if there is something you can find that will work out of the box, but if you do need to implement your own version of OpenSessionInViewFilter, it should be fairly simple -- the source code for the JPA version is very clean and could easily be retooled for another framework.

jkraybill
  • 3,339
  • 27
  • 32