Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

EPMRPP-96070 || Add dynamic insert for default db values #1042

Merged
merged 2 commits into from
Oct 15, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading