fix(manager-api-beans): fix relationship for composite ID
MODIFY
manager/api/beans/src/main/java/io/apiman/manager/api/beans/apis/ApiBean.java
manager/api/beans/src/main/java/io/apiman/manager/api/beans/apis/ApiBean.java
@@ -73,7 +73,7 @@ public class ApiBean implements Serializable, Cloneable {
private String description;
@ManyToMany(cascade = CascadeType.ALL)
@JoinTable(name = "api_tag",
- joinColumns = @JoinColumn(name = "api_id"),
+ joinColumns = { @JoinColumn(name = "api_id"), @JoinColumn(name = "org_id") },
inverseJoinColumns = @JoinColumn(name = "tag_id")
)
@JsonIgnore

MODIFY
manager/api/beans/src/main/java/io/apiman/manager/api/beans/apis/KeyValueTag.java
manager/api/beans/src/main/java/io/apiman/manager/api/beans/apis/KeyValueTag.java
@@ -13,7 +13,6 @@ import org.hibernate.annotations.NaturalId;
* Simple tag with value.
*/
@Entity
-//@Immutable
public class KeyValueTag {
@Id
@GeneratedValue
@@ -29,6 +28,15 @@ public class KeyValueTag {
public KeyValueTag() {
}
+ public Long getId() {
+ return id;
+ }
+
+ public KeyValueTag setId(Long id) {
+ this.id = id;
+ return this;
+ }
+
public String getKey() {
return key;
}

fix(manager-api-beans): fix relationship for composite ID