Removing JPA annotations in Id classes
MODIFY
modules/registry-refactoring/src/main/java/org/apache/airavata/registry/core/entities/replicacatalog/ConfigurationPK.java
modules/registry-refactoring/src/main/java/org/apache/airavata/registry/core/entities/replicacatalog/ConfigurationPK.java
@@ -31,12 +31,7 @@ public class ConfigurationPK implements Serializable {
//default serial version id, required for serializable classes.
private static final long serialVersionUID = 1L;
- @Id
- @Column(name = "CONFIG_KEY")
private String configKey;
-
- @Id
- @Column(name = "CONFIG_VAL")
private String configVal;
public String getConfigKey() {

MODIFY
modules/registry-refactoring/src/main/java/org/apache/airavata/registry/core/entities/replicacatalog/DataProductEntity.java
modules/registry-refactoring/src/main/java/org/apache/airavata/registry/core/entities/replicacatalog/DataProductEntity.java
@@ -66,9 +66,9 @@ public class DataProductEntity implements Serializable {
@Column(name = "PRODUCT_TYPE")
private DataProductType dataProductType;
- //@ElementCollection(fetch = FetchType.EAGER)
- //@CollectionTable(name="DATA_PRODUCT_METADATA", joinColumns = @JoinColumn(name="PRODUCT_URI"))
- //@Column(name = "METADATA_KEY")
+ @ElementCollection(fetch = FetchType.EAGER)
+ @CollectionTable(name="DATA_PRODUCT_METADATA", joinColumns = @JoinColumn(name="PRODUCT_URI"))
+ @Column(name = "METADATA_KEY")
private Map<String, String> productMetadata;
@OneToMany(targetEntity = DataReplicaLocationEntity.class, cascade = CascadeType.ALL,

MODIFY
modules/registry-refactoring/src/main/java/org/apache/airavata/registry/core/entities/replicacatalog/DataProductMetadataPK.java
modules/registry-refactoring/src/main/java/org/apache/airavata/registry/core/entities/replicacatalog/DataProductMetadataPK.java
@@ -31,12 +31,7 @@ public class DataProductMetadataPK implements Serializable {
//default serial version id, required for serializable classes.
private static final long serialVersionUID = 1L;
- @Id
- @Column(name = "PRODUCT_URI")
private String productUri;
-
- @Id
- @Column(name = "METADATA_KEY")
private String metadataKey;
public String getProductUri() {

MODIFY
modules/registry-refactoring/src/main/java/org/apache/airavata/registry/core/entities/replicacatalog/DataReplicaLocationEntity.java
modules/registry-refactoring/src/main/java/org/apache/airavata/registry/core/entities/replicacatalog/DataReplicaLocationEntity.java
@@ -70,9 +70,9 @@ public class DataReplicaLocationEntity implements Serializable {
@Column(name = "REPLICA_PERSISTENT_TYPE")
private ReplicaPersistentType replicaPersistentType;
- //@ElementCollection(fetch = FetchType.EAGER)
- //@CollectionTable(name="DATA_REPLICA_METADATA", joinColumns = @JoinColumn(name="REPLICA_ID"))
- //@Column(name = "METADATA_KEY")
+ @ElementCollection(fetch = FetchType.EAGER)
+ @CollectionTable(name="DATA_REPLICA_METADATA", joinColumns = @JoinColumn(name="REPLICA_ID"))
+ @Column(name = "METADATA_KEY")
private Map<String, String> replicaMetadata;
@ManyToOne(targetEntity = DataProductEntity.class, cascade = CascadeType.MERGE)

MODIFY
modules/registry-refactoring/src/main/java/org/apache/airavata/registry/core/entities/replicacatalog/DataReplicaMetadataPK.java
modules/registry-refactoring/src/main/java/org/apache/airavata/registry/core/entities/replicacatalog/DataReplicaMetadataPK.java
@@ -30,12 +30,7 @@ import java.io.Serializable;
public class DataReplicaMetadataPK implements Serializable {
private static final long serialVersionUID = 1L;
- @Id
- @Column(name = "REPLICA_ID")
private String replicaId;
-
- @Id
- @Column(name = "METADATA_KEY")
private String metadataKey;
public String getReplicaId() {

Removing JPA annotations in Id classes