rsanchez
2014-12-12 4c13c7324a920f5cca9601154e5224e5d7484fa9
securis/src/main/java/net/curisit/securis/db/LicenseTypeMetadata.java
....@@ -12,10 +12,10 @@
1212 import javax.persistence.Table;
1313
1414 import com.fasterxml.jackson.annotation.JsonAutoDetect;
15
+import com.fasterxml.jackson.annotation.JsonBackReference;
1516 import com.fasterxml.jackson.annotation.JsonIgnore;
1617 import com.fasterxml.jackson.annotation.JsonInclude;
1718 import com.fasterxml.jackson.annotation.JsonInclude.Include;
18
-import com.fasterxml.jackson.annotation.JsonProperty;
1919
2020 /**
2121 * Entity implementation class for Entity: licensetype_metadata
....@@ -32,10 +32,11 @@
3232
3333 private static final long serialVersionUID = 1L;
3434
35
- @Id
3635 @JsonIgnore
36
+ @Id
3737 @ManyToOne
3838 @JoinColumn(name = "license_type_id")
39
+ @JsonBackReference
3940 private LicenseType licenseType;
4041
4142 @Id
....@@ -45,21 +46,6 @@
4546 private String value;
4647
4748 private boolean mandatory;
48
-
49
- @JsonProperty("licensetype_id")
50
- public Integer getLicenseTypeId() {
51
- return licenseType == null ? null : licenseType.getId();
52
- }
53
-
54
- @JsonProperty("licensetype_id")
55
- public void setLicenseTypeId(Integer idLicenseType) {
56
- if (idLicenseType == null) {
57
- licenseType = null;
58
- } else {
59
- licenseType = new LicenseType();
60
- licenseType.setId(idLicenseType);
61
- }
62
- }
6349
6450 public LicenseType getLicenseType() {
6551 return licenseType;