aboutsummaryrefslogtreecommitdiff
path: root/src/org/traccar/web/shared/model/User.java
diff options
context:
space:
mode:
authorAnton Tananaev <anton.tananaev@gmail.com>2013-02-14 19:53:09 +1300
committerAnton Tananaev <anton.tananaev@gmail.com>2013-02-14 19:53:09 +1300
commit9c3a57236022bd25556824db65098c3a0f909ed5 (patch)
treeac12fb47be97110ee492d687143ee0baeed365f5 /src/org/traccar/web/shared/model/User.java
parentd6f8abaf76e782100163cda162aeae80a8a5789d (diff)
downloadtrackermap-web-9c3a57236022bd25556824db65098c3a0f909ed5.tar.gz
trackermap-web-9c3a57236022bd25556824db65098c3a0f909ed5.tar.bz2
trackermap-web-9c3a57236022bd25556824db65098c3a0f909ed5.zip
Enabled eager fetching (fix #11)
Diffstat (limited to 'src/org/traccar/web/shared/model/User.java')
-rw-r--r--src/org/traccar/web/shared/model/User.java3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/org/traccar/web/shared/model/User.java b/src/org/traccar/web/shared/model/User.java
index dcfd6b29..89bebc07 100644
--- a/src/org/traccar/web/shared/model/User.java
+++ b/src/org/traccar/web/shared/model/User.java
@@ -21,6 +21,7 @@ import java.util.List;
import javax.persistence.Column;
import javax.persistence.Entity;
+import javax.persistence.FetchType;
import javax.persistence.GeneratedValue;
import javax.persistence.Id;
import javax.persistence.OneToMany;
@@ -70,7 +71,7 @@ public class User implements Serializable, Cloneable {
return password;
}
- @OneToMany
+ @OneToMany(fetch = FetchType.EAGER)
private List<Device> devices = new LinkedList<Device>();
public List<Device> getDevices() {