I have deployed an spring+JPA+hibernate application on tomcat. Below is the relationship of objects in my application.
Object A (1)-- (1) Object B (1) --- (N) Object C
I have implemented using JPA annotation on object A,B and C with Fetch EAGER. So Whenever I query an object A, it should return a list of object C. With the unit testing it appears there is no problem returning a list of object C. However with the tomcat it returns only one object of C. I'm dumbfounded why it should not return a list.
With the unit test, I use ClasspathXmlApplicationContext to retrieve the xml and create a handler to set DAO with entityManager object. As for the tomcat I let the container to set the DAO. Any idea why it's giving a different result??