Hendrik Jungnitsch
2022-09-07 86a01d37d927894f9ccd672504a05658286fa529
src/main/java/de/gedoplan/seminar/jpa/exercise/domain/Highway.java
@@ -1,8 +1,14 @@
package de.gedoplan.seminar.jpa.exercise.domain;
import java.util.ArrayList;
import java.util.List;
import javax.persistence.Entity;
import javax.persistence.Id;
import javax.persistence.OneToMany;
import javax.persistence.Table;
import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
@Entity
@Table(name = Highway.TABLE_NAME)
@@ -15,6 +21,10 @@
   private String name;
   private String origin;
   private String destination;
   @JsonIgnoreProperties("highway")
   @OneToMany(mappedBy = "highway")
   private List<Junction> junctions = new ArrayList<>();
   
   public Highway() {
   }
@@ -57,6 +67,11 @@
   public String getDestination() {
      return this.destination;
   }
   public List<Junction> getJunctions() {
      return junctions;
   }
   @Override
   public String toString() {