From 681026758d2f80082c4597ec0393bff07c95be65 Mon Sep 17 00:00:00 2001 From: Julien Dubois Date: Sat, 2 Mar 2013 01:06:36 +0100 Subject: [PATCH] JPA tuning --- .../samples/petclinic/model/Pet.java | 2 +- src/main/webapp/WEB-INF/web.xml | 17 ++++++++++++++++- 2 files changed, 17 insertions(+), 2 deletions(-) diff --git a/src/main/java/org/springframework/samples/petclinic/model/Pet.java b/src/main/java/org/springframework/samples/petclinic/model/Pet.java index 5b3c806f903..0fb907ce7aa 100644 --- a/src/main/java/org/springframework/samples/petclinic/model/Pet.java +++ b/src/main/java/org/springframework/samples/petclinic/model/Pet.java @@ -48,7 +48,7 @@ public class Pet extends NamedEntity { @JoinColumn(name = "owner_id") private Owner owner; - @OneToMany(cascade = CascadeType.ALL, mappedBy = "pet", fetch = FetchType.EAGER) + @OneToMany(cascade = CascadeType.ALL, mappedBy = "pet") private Set visits; diff --git a/src/main/webapp/WEB-INF/web.xml b/src/main/webapp/WEB-INF/web.xml index 695c8de3d0c..7c0fe268675 100644 --- a/src/main/webapp/WEB-INF/web.xml +++ b/src/main/webapp/WEB-INF/web.xml @@ -10,7 +10,7 @@ http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd" spring.profiles.active - jdbc + jpa