Skip to content

Commit

Permalink
EPMRPP-96070 || Add dynamic insert for default db values (#1042)
Browse files Browse the repository at this point in the history
* EPMRPP-96070 || Add dynamic insert for user object to use default database values

* EPMRPP-96070 || Add dynamic insert for user object to use default database values
  • Loading branch information
pbortnik authored Oct 15, 2024
1 parent b2bf8bd commit ce13df3
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -236,7 +236,7 @@ public ReportPortalUserBuilder withProjectDetails(Map<String, ProjectDetails> pr
}

public ReportPortalUser fromUser(com.epam.ta.reportportal.entity.user.User user) {
this.active = user.isActive();
this.active = user.getActive();
this.username = user.getLogin();
this.email = user.getPassword();
this.userId = user.getId();
Expand Down
4 changes: 3 additions & 1 deletion src/main/java/com/epam/ta/reportportal/entity/user/User.java
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@
import lombok.Getter;
import lombok.NoArgsConstructor;
import lombok.Setter;
import org.hibernate.annotations.DynamicInsert;
import org.hibernate.annotations.Type;
import org.hibernate.annotations.TypeDef;

Expand All @@ -48,6 +49,7 @@
@Entity
@TypeDef(name = "meta", typeClass = Metadata.class)
@Table(name = "users", schema = "public")
@DynamicInsert
public class User implements Serializable {

private static final long serialVersionUID = 923392981;
Expand All @@ -64,7 +66,7 @@ public class User implements Serializable {
private String externalId;

@Column(name = "active")
private boolean active;
private Boolean active;

@Column(name = "login")
private String login;
Expand Down

0 comments on commit ce13df3

Please sign in to comment.