Commit 4da7ac3d by Juho Juopperi

add userId to placepojo (e.g. image is fetched with user and not eventuser id)

1 parent 7ff99530
...@@ -44,6 +44,7 @@ public class PlacePojo { ...@@ -44,6 +44,7 @@ public class PlacePojo {
private String description; private String description;
private Integer reserverId; private Integer reserverId;
private Integer eventuserId; private Integer eventuserId;
private Integer userId;
public String getName() { public String getName() {
return name; return name;
...@@ -182,4 +183,11 @@ public class PlacePojo { ...@@ -182,4 +183,11 @@ public class PlacePojo {
this.eventuserId = eventuserId; this.eventuserId = eventuserId;
} }
public Integer getUserId() {
return userId;
}
public void setUserId(Integer userId) {
this.userId = userId;
}
} }
...@@ -102,7 +102,9 @@ public class PojoUtils { ...@@ -102,7 +102,9 @@ public class PojoUtils {
ret.setMapId(place.getMap().getId()); ret.setMapId(place.getMap().getId());
} }
if (place.getPlaceReserver() != null && place.getPlaceReserver().getUser() != null) { if (place.getPlaceReserver() != null && place.getPlaceReserver().getUser() != null) {
ret.setEventuserId(place.getPlaceReserver().getUser().getId()); EventUser eventUser = place.getPlaceReserver().getUser();
ret.setEventuserId(eventUser.getId());
ret.setUserId(eventUser.getUser().getId());
} }
return ret; return ret;
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!