Skip to content

Commit

Permalink
Fix: Fix logout endpoint StackOverflowError caused by Lombok.
Browse files Browse the repository at this point in the history
  • Loading branch information
AhmedMohamedAbdelaty committed Nov 2, 2024
1 parent 92385bd commit 301fb5f
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 9 deletions.
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

0 comments on commit 301fb5f

Please sign in to comment.