Index: sources/app/src/main/java/parkup/controllers/ParkingZoneController.java
===================================================================
--- sources/app/src/main/java/parkup/controllers/ParkingZoneController.java	(revision 9dd526f0ddf9a23ad37dd4c977f761ff959f5913)
+++ sources/app/src/main/java/parkup/controllers/ParkingZoneController.java	(revision df4089c7ef898fde56a92f138b1af0174628ad75)
@@ -25,6 +25,6 @@
 
     @GetMapping({"/parkingZone/{parkingZoneId}"})
-    public ParkingZone getParkingZone(@PathVariable int parkingZoneId) {
-        ParkingZone parkingZone = parkingZoneService.findById(parkingZoneId);
+    public ParkingZoneAdminView getParkingZone(@PathVariable int parkingZoneId) {
+        ParkingZoneAdminView parkingZone = parkingZoneService.findById(parkingZoneId);
         if (parkingZone != null) {
             return parkingZone;
@@ -50,9 +50,8 @@
 
     @PutMapping({"/parkingZone/{parkingZoneId}"})
-    public ParkingZone updateParkingZone(@PathVariable int parkingZoneId, @RequestBody ParkingZoneAdminView parkingZone) {
+    public ParkingZoneAdminView updateParkingZone(@PathVariable int parkingZoneId, @RequestBody ParkingZoneAdminView parkingZone) {
         return this.parkingZoneService.updateParkingZone(parkingZoneId, parkingZone.getPzName(), parkingZone.getPrice(),
-                parkingZone.getAddress(), parkingZone.getTime_from(), parkingZone.getTime_to(), parkingZone.getColor(),
+                parkingZone.getAddress(), parkingZone.getFrom(), parkingZone.getTo(), parkingZone.getColor(),
                 parkingZone.getParkingSpaces(), parkingZone.getParkingZoneLocation(),parkingZone.getResponsibleWorkers());
-
     }
 
Index: sources/app/src/main/java/parkup/controllers/VrabotenController.java
===================================================================
--- sources/app/src/main/java/parkup/controllers/VrabotenController.java	(revision 9dd526f0ddf9a23ad37dd4c977f761ff959f5913)
+++ sources/app/src/main/java/parkup/controllers/VrabotenController.java	(revision df4089c7ef898fde56a92f138b1af0174628ad75)
@@ -24,5 +24,5 @@
 
     @GetMapping({"/vraboten"})
-    public List<Worker> getAllVraboten() {
+    public List<WorkerDemo> getAllVraboten() {
         return this.workerService.getWorkers();
     }
Index: sources/app/src/main/java/parkup/data/ParkingZoneAdminView.java
===================================================================
--- sources/app/src/main/java/parkup/data/ParkingZoneAdminView.java	(revision 9dd526f0ddf9a23ad37dd4c977f761ff959f5913)
+++ sources/app/src/main/java/parkup/data/ParkingZoneAdminView.java	(revision df4089c7ef898fde56a92f138b1af0174628ad75)
@@ -2,4 +2,5 @@
 
 import parkup.entities.ParkingSpace;
+import parkup.entities.ParkingZone;
 
 import java.util.List;
@@ -9,26 +10,28 @@
     private String pzName;
     private int price;
-    private int time_from;
-    private int time_to;
+    private int from;
+    private int to;
     private String address;
     private String color;
     private List<ParkingSpace> parkingSpaces;
     private ParkingZoneLocation parkingZoneLocation;
-    private List<Integer> responsibleWorkers;
+    private List<WorkerDemo> responsibleWorkers;
 
-    public ParkingZoneAdminView(int pzId, String pzName, int price, int time_from, int time_to, String address, String color, List<ParkingSpace> parkingSpaces, ParkingZoneLocation parkingZoneLocation, List<Integer> responsibleWorkers) {
-        this.pzId = pzId;
-        this.pzName = pzName;
-        this.price = price;
-        this.time_from = time_from;
-        this.time_to = time_to;
-        this.address = address;
-        this.color = color;
-        this.parkingSpaces = parkingSpaces;
-        this.parkingZoneLocation = parkingZoneLocation;
+    public ParkingZoneAdminView(ParkingZone pz,List<WorkerDemo> responsibleWorkers) {
+        this.pzId = pz.getId();
+        this.pzName = pz.getPzName();
+        this.price = pz.getPrice();
+        this.from = pz.getFrom();
+        this.to = pz.getTo();
+        this.address = pz.getAddress();
+        this.color = pz.getColor();
+        this.parkingSpaces = pz.getParkingSpaces();
+        this.parkingZoneLocation = pz.getParkingZoneLocation();
         this.responsibleWorkers = responsibleWorkers;
     }
 
     public ParkingZoneAdminView() {}
+
+
 
     public int getPzId() {
@@ -56,18 +59,18 @@
     }
 
-    public int getTime_from() {
-        return time_from;
+    public int getFrom() {
+        return from;
     }
 
-    public void setTime_from(int time_from) {
-        this.time_from = time_from;
+    public void setFrom(int from) {
+        this.from = from;
     }
 
-    public int getTime_to() {
-        return time_to;
+    public int getTo() {
+        return to;
     }
 
-    public void setTime_to(int time_to) {
-        this.time_to = time_to;
+    public void setTo(int to) {
+        this.to = to;
     }
 
@@ -104,9 +107,9 @@
     }
 
-    public List<Integer> getResponsibleWorkers() {
+    public List<WorkerDemo> getResponsibleWorkers() {
         return responsibleWorkers;
     }
 
-    public void setResponsibleWorkers(List<Integer> responsibleWorkers) {
+    public void setResponsibleWorkers(List<WorkerDemo> responsibleWorkers) {
         this.responsibleWorkers = responsibleWorkers;
     }
Index: sources/app/src/main/java/parkup/data/WorkerDemo.java
===================================================================
--- sources/app/src/main/java/parkup/data/WorkerDemo.java	(revision 9dd526f0ddf9a23ad37dd4c977f761ff959f5913)
+++ sources/app/src/main/java/parkup/data/WorkerDemo.java	(revision df4089c7ef898fde56a92f138b1af0174628ad75)
@@ -1,3 +1,5 @@
 package parkup.data;
+
+import parkup.entities.Worker;
 
 public class WorkerDemo {
@@ -9,10 +11,11 @@
     public WorkerDemo() {}
 
-    public WorkerDemo(int id, String firstName, String lastName, String email) {
-        this.workerId =id;
-        this.firstName = firstName;
-        this.lastName = lastName;
-        this.email = email;
+    public WorkerDemo(Worker w) {
+        this.workerId =w.getWorkerId();
+        this.firstName = w.getFirstName();
+        this.lastName = w.getLastName();
+        this.email = w.getEmail();
     }
+
 
     public int getWorkerId() {
Index: sources/app/src/main/java/parkup/services/ParkingZoneService.java
===================================================================
--- sources/app/src/main/java/parkup/services/ParkingZoneService.java	(revision 9dd526f0ddf9a23ad37dd4c977f761ff959f5913)
+++ sources/app/src/main/java/parkup/services/ParkingZoneService.java	(revision df4089c7ef898fde56a92f138b1af0174628ad75)
@@ -3,5 +3,7 @@
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.stereotype.Service;
+import parkup.data.ParkingZoneAdminView;
 import parkup.data.ParkingZoneLocation;
+import parkup.data.WorkerDemo;
 import parkup.entities.ParkingSpace;
 import parkup.entities.ParkingZone;
@@ -17,4 +19,5 @@
 import java.util.Objects;
 import java.util.Optional;
+import java.util.stream.Collectors;
 
 @Service
@@ -36,16 +39,16 @@
         List<ParkingZone> parkingZones= parkingZoneRepository.findAll();
         for(ParkingZone pz:parkingZones){
-            setTransientVariables(pz.getId());
+            setTransientVariables(pz);
         }
         return parkingZones;
     }
 
-    public ParkingZone findById(int parkingZoneId) {
+    public ParkingZoneAdminView findById(int parkingZoneId) {
         Optional<ParkingZone> parkingZone = Optional.ofNullable(this.parkingZoneRepository.findByPzId(parkingZoneId));
         if (!parkingZone.isPresent()) {
             throw new IllegalStateException("ParkingZone does not exist");
         }
-        setTransientVariables(parkingZone.get().getId());
-        return parkingZone.get();
+        setTransientVariables(parkingZone.get());
+        return new ParkingZoneAdminView(parkingZone.get(),getResponsibleWorkers(parkingZoneId));
     }
 
@@ -83,7 +86,7 @@
     //TODO proveri dali ima odgovorni i dokolku ima dali postojat vo bazata
     @Transactional
-    public ParkingZone updateParkingZone(int parkingZoneId, String pzName, int price,
+    public ParkingZoneAdminView updateParkingZone(int parkingZoneId, String pzName, int price,
                                          String location, int from, int to, String color,
-                                         List<ParkingSpace> parkingSpaces, ParkingZoneLocation parkingZoneLocation, List<Integer> odgovorniLica) {
+                                         List<ParkingSpace> parkingSpaces, ParkingZoneLocation parkingZoneLocation, List<WorkerDemo> responsibleWorkers) {
 
         //TODO prati niza od objekti ParkingSpaces i prati objekt ParkingZoneLocation
@@ -124,22 +127,14 @@
 
                 if (!parkingSpaces.isEmpty()) {
+                    List<String> psNamesInZone=parkingZoneNov.getParkingSpaces().stream().map(ParkingSpace::getPsName).collect(Collectors.toList());
+                    List<ParkingSpace> psToAdd=parkingSpaces.stream().filter(ps->!psNamesInZone.contains(ps.getPsName())).collect(Collectors.toList());
+                    for(ParkingSpace ps:psToAdd){
+                        parkingZoneNov.getParkingSpaces().add(ps);
+                    }
+                }
+                if (!responsibleWorkers.isEmpty()) {
                     ParkingZone parkingZone = parkingZoneRepository.findByPzId(parkingZoneId);
-//                    for(ParkingSpace space :parkingZone.getParkingSpaces()){
-//                        if(!parkingSpaces.contains(space)){
-//                            for(ParkingSession session: parkingSessionRepository.findByParkingZonePzName(pzName)){
-//                                if(session.getParkingSpace().getPsId()==space.getPsId())
-//                                    throw new IllegalStateException("Vlegov vo iffot");
-//                            }
-//                        }
-//                    }
-                    //TODO: treba da se opravi 
-                    parkingZone.setParkingSpaces(null);
-                    List<ParkingSpace> spacesToAdd = new ArrayList<>(parkingSpaces);
-                    parkingZone.setParkingSpaces(spacesToAdd);
-                }
-                if (!odgovorniLica.isEmpty()) {
-                    ParkingZone parkingZone = parkingZoneRepository.findByPzId(parkingZoneId);
-                    for (Integer vrabotenId : odgovorniLica) {
-                        Worker workerToAdd = workerRepository.findByWorkerId(vrabotenId);
+                    for (Integer workerId : responsibleWorkers.stream().map(WorkerDemo::getWorkerId).collect(Collectors.toList())) {
+                        Worker workerToAdd = workerRepository.findByWorkerId(workerId);
                         if(workerToAdd !=null)
                         workerToAdd.getParkingZones().add(parkingZone);
@@ -147,6 +142,6 @@
                 }
 
-
-                return parkingZoneNov;
+                setTransientVariables(parkingZoneNov);
+                return new ParkingZoneAdminView(parkingZoneNov,getResponsibleWorkers(parkingZoneId));
             } else {
                 throw new IllegalStateException("There ParkingZone does not exist");
@@ -159,4 +154,6 @@
             Optional<ParkingZone> parkingZoneOpt = Optional.ofNullable(parkingZoneRepository.findByPzId(parkingZoneId));
             if (parkingZoneOpt.isPresent()) {
+                parkingZoneOpt.get().setParkingSpaces(null);
+                parkingZoneOpt.get().setParkingZoneLocation(null);
                 parkingZoneRepository.deleteByPzId(parkingZoneId);
             } else {
@@ -174,7 +171,11 @@
             return parkingZone.getParkingSpaces().size();
         }
-        public void setTransientVariables(int pzId){
-            calculateCapacity(pzId);
-            calculateTakenSpaces(pzId);
+        public void setTransientVariables(ParkingZone pz){
+            pz.setCapacity(calculateCapacity(pz.getId()));
+            pz.setTakenSpaces(calculateTakenSpaces(pz.getId()));
+        }
+        public List<WorkerDemo> getResponsibleWorkers(int pzId){
+            ParkingZone parkingZone =parkingZoneRepository.findByPzId(pzId);
+            return workerRepository.findAll().stream().filter(w->w.getParkingZones().contains(parkingZone)).map(WorkerDemo::new).collect(Collectors.toList());
         }
     }
Index: sources/app/src/main/java/parkup/services/WorkerService.java
===================================================================
--- sources/app/src/main/java/parkup/services/WorkerService.java	(revision 9dd526f0ddf9a23ad37dd4c977f761ff959f5913)
+++ sources/app/src/main/java/parkup/services/WorkerService.java	(revision df4089c7ef898fde56a92f138b1af0174628ad75)
@@ -31,6 +31,6 @@
     }
 
-    public List<Worker> getWorkers() {
-        return this.workerRepository.findAll();
+    public List<WorkerDemo> getWorkers() {
+        return this.workerRepository.findAll().stream().map(WorkerDemo::new).collect(Collectors.toList());
     }
 
@@ -44,6 +44,6 @@
         List<Worker> workers = this.workerRepository.findAll();
         List<WorkerDemo> workerDemos = new ArrayList<>();
-        for (Worker v : workers){
-            WorkerDemo vd = new WorkerDemo(v.getWorkerId(),v.getFirstName(), v.getLastName(), v.getEmail());
+        for (Worker w : workers){
+            WorkerDemo vd = new WorkerDemo(w);
             workerDemos.add(vd);
         }
Index: sources/app/target/classes/application.properties
===================================================================
--- sources/app/target/classes/application.properties	(revision 9dd526f0ddf9a23ad37dd4c977f761ff959f5913)
+++ sources/app/target/classes/application.properties	(revision df4089c7ef898fde56a92f138b1af0174628ad75)
@@ -2,5 +2,5 @@
 spring.datasource.username=postgres
 spring.datasource.password=1234
-spring.jpa.hibernate.ddl-auto=create-drop
+spring.jpa.hibernate.ddl-auto=update
 spring.jpa.show-sql=true
 spring.jpa.properties.hibernate.dialect=org.hibernate.dialect.PostgreSQLDialect
