Skip to content
Snippets Groups Projects
Commit e02c3856 authored by Labros Papadopoulos's avatar Labros Papadopoulos
Browse files

fixing entity relationships

parent 7a02a0cc
No related branches found
No related tags found
2 merge requests!11Merging 2024Q2_RC into main, creating 2024Q2 Release,!8Tmf 674 feature
Pipeline #5874 passed
......@@ -6,7 +6,9 @@ import com.fasterxml.jackson.annotation.JsonProperty;
import io.swagger.v3.oas.annotations.media.Schema;
import jakarta.persistence.CascadeType;
import jakarta.persistence.Entity;
import jakarta.persistence.OneToOne;
import jakarta.validation.Valid;
......@@ -37,6 +39,7 @@ public class GeographicAddressValue extends PlaceRefOrValue {
@JsonProperty("streetType")
private String streetType;
@JsonProperty("geographicSubAddress")
@OneToOne(cascade = { CascadeType.MERGE, CascadeType.PERSIST, CascadeType.REFRESH })
private GeographicSubAddressValue geographicSubAddress;
@JsonProperty("city")
private String city;
......
......@@ -27,6 +27,7 @@ public class GeographicSite extends BaseRootEntity implements PatchGeographicSit
@JsonProperty("status")
private String status;
@JsonProperty("externalIdentifier")
@OneToMany(cascade = { CascadeType.MERGE, CascadeType.PERSIST, CascadeType.REFRESH })
private List<ExternalIdentifier> externalIdentifier = new ArrayList<>();
@JsonProperty("calendar")
@OneToMany(cascade = { CascadeType.MERGE, CascadeType.PERSIST, CascadeType.REFRESH })
......
......@@ -6,20 +6,16 @@ import io.swagger.v3.oas.annotations.media.Schema;
import jakarta.persistence.Table;
import jakarta.validation.constraints.NotNull;
import jakarta.persistence.Entity;
import org.etsi.osl.tmf.common.model.BaseRootEntity;
/**
* GeographicSubAddressUnit
*/
@Entity(name = "GeographicSubAddressUnit")
@Table(name = "GeographicSubAddressUnit")
@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen", date = "2024-04-24T14:24:54.867613034Z[Etc/UTC]", comments = "Generator version: 7.6.0-SNAPSHOT")
public class GeographicSubAddressUnit {
@JsonProperty("@schemaLocation")
private String schemaLocation;
@JsonProperty("@baseType")
private String baseType;
@JsonProperty("@type")
private String type;
@JsonProperty("subUnitNumber")
public class GeographicSubAddressUnit extends BaseRootEntity {
@JsonProperty("subUnitNumber")
private String subUnitNumber;
@JsonProperty("subUnitType")
private String subUnitType;
......
......@@ -11,6 +11,8 @@ import jakarta.persistence.Table;
import jakarta.validation.Valid;
import jakarta.validation.constraints.NotNull;
import jakarta.persistence.Entity;
import org.etsi.osl.tmf.common.model.BaseRootEntity;
/**
* GeographicSubAddressValue
*/
......@@ -18,13 +20,7 @@ import jakarta.persistence.Entity;
@Entity(name = "GeographicSubAddressValue")
@Table(name = "GeographicSubAddressValue")
@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen", date = "2024-04-24T14:24:54.867613034Z[Etc/UTC]", comments = "Generator version: 7.6.0-SNAPSHOT")
public class GeographicSubAddressValue {
@JsonProperty("@type")
private String type;
@JsonProperty("@baseType")
private String baseType;
@JsonProperty("@schemaLocation")
private String schemaLocation;
public class GeographicSubAddressValue extends BaseRootEntity {
@JsonProperty("buildingName")
private String buildingName;
@JsonProperty("levelNumber")
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment