This is an automated email from the ASF dual-hosted git repository.
isjarana pushed a commit to branch staging
in repository https://gitbox.apache.org/repos/asf/airavata-custos.git
The following commit(s) were added to refs/heads/staging by this push:
new c654e475c Change ID generator
new 940861f4a Merge pull request #392 from isururanawaka/develop
c654e475c is described below
commit c654e475c3dc6c83dcf239fcbd57060cbc0e9477
Author: Isuru Ranawaka <[email protected]>
AuthorDate: Tue Jul 18 17:21:02 2023 -0400
Change ID generator
---
.../apache/custos/agent/profile/persistance/model/AgentAttribute.java | 3 ++-
.../org/apache/custos/agent/profile/persistance/model/AgentRole.java | 3 ++-
2 files changed, 4 insertions(+), 2 deletions(-)
diff --git
a/custos-services/custos-core-services/agent-profile-core-service/src/main/java/org/apache/custos/agent/profile/persistance/model/AgentAttribute.java
b/custos-services/custos-core-services/agent-profile-core-service/src/main/java/org/apache/custos/agent/profile/persistance/model/AgentAttribute.java
index f1b526dda..d897a976f 100644
---
a/custos-services/custos-core-services/agent-profile-core-service/src/main/java/org/apache/custos/agent/profile/persistance/model/AgentAttribute.java
+++
b/custos-services/custos-core-services/agent-profile-core-service/src/main/java/org/apache/custos/agent/profile/persistance/model/AgentAttribute.java
@@ -26,7 +26,8 @@ import jakarta.persistence.*;
public class AgentAttribute {
@Id
- @GeneratedValue(strategy = GenerationType.AUTO)
+ @GeneratedValue(strategy = GenerationType.SEQUENCE, generator =
"agent_attr_id_generator")
+ @SequenceGenerator(name = "agent_attr_id_generator", sequenceName =
"agent_attr_id_generator_sequence", initialValue = 1500, allocationSize = 100)
private Long id;
@Column(nullable = false)
diff --git
a/custos-services/custos-core-services/agent-profile-core-service/src/main/java/org/apache/custos/agent/profile/persistance/model/AgentRole.java
b/custos-services/custos-core-services/agent-profile-core-service/src/main/java/org/apache/custos/agent/profile/persistance/model/AgentRole.java
index e8a429c87..51469c32d 100644
---
a/custos-services/custos-core-services/agent-profile-core-service/src/main/java/org/apache/custos/agent/profile/persistance/model/AgentRole.java
+++
b/custos-services/custos-core-services/agent-profile-core-service/src/main/java/org/apache/custos/agent/profile/persistance/model/AgentRole.java
@@ -26,7 +26,8 @@ import jakarta.persistence.*;
public class AgentRole {
@Id
- @GeneratedValue(strategy = GenerationType.AUTO)
+ @GeneratedValue(strategy = GenerationType.SEQUENCE, generator =
"agent_role_id_generator")
+ @SequenceGenerator(name = "agent_role_id_generator", sequenceName =
"agent_role_id_generator_sequence", initialValue = 1500, allocationSize = 100)
private Long id;
@Column(nullable = false)