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

Fix logout endpoint StackOverflowError caused by Lombok #54

Merged
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
@@ -1,10 +1,7 @@
package com.activecourses.upwork.model;

import jakarta.persistence.*;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;
import lombok.*;

import java.time.Instant;

Expand All @@ -26,6 +23,7 @@ public class RefreshToken {
@Column(nullable = false)
private Instant expiryDate;

@ToString.Exclude
@OneToOne
@JoinColumn(name = "user_id", unique = true)
private User user;
Expand Down
7 changes: 2 additions & 5 deletions src/main/java/com/activecourses/upwork/model/UserProfile.java
Original file line number Diff line number Diff line change
@@ -1,10 +1,7 @@
package com.activecourses.upwork.model;

import jakarta.persistence.*;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;
import lombok.*;
import org.springframework.data.jpa.domain.support.AuditingEntityListener;

import java.math.BigDecimal;
Expand All @@ -28,9 +25,9 @@ public class UserProfile {
@Column(precision = 19, scale = 2) // Example precision and scale
private BigDecimal hourlyRate;


private String location;

@ToString.Exclude
@OneToOne(cascade = CascadeType.ALL)
@JoinColumn(name = "user_id", unique = true)
private User user;
Expand Down