aboutsummaryrefslogtreecommitdiff
path: root/src/org/traccar/web/shared/model/Position.java
diff options
context:
space:
mode:
Diffstat (limited to 'src/org/traccar/web/shared/model/Position.java')
-rw-r--r--src/org/traccar/web/shared/model/Position.java5
1 files changed, 2 insertions, 3 deletions
diff --git a/src/org/traccar/web/shared/model/Position.java b/src/org/traccar/web/shared/model/Position.java
index d5fa9a91..d9ec3b3f 100644
--- a/src/org/traccar/web/shared/model/Position.java
+++ b/src/org/traccar/web/shared/model/Position.java
@@ -19,6 +19,7 @@ import java.io.Serializable;
import java.util.Date;
import javax.persistence.Entity;
+import javax.persistence.FetchType;
import javax.persistence.GeneratedValue;
import javax.persistence.Id;
import javax.persistence.ManyToOne;
@@ -26,8 +27,6 @@ import javax.persistence.Table;
import org.hibernate.annotations.Index;
-//INSERT INTO positions (device_id, valid, time, latitude, longitude, altitude, speed, course) VALUES (11, 1, NOW(), 60, 30, 0, 0, 0);
-
@Entity
@Table(name = "positions")
public class Position implements Serializable, Cloneable {
@@ -60,7 +59,7 @@ public class Position implements Serializable, Cloneable {
return id;
}
- @ManyToOne
+ @ManyToOne(fetch = FetchType.EAGER)
@Index(name = "positionsIndex")
private Device device;