Correctness4 - SpotBugsExtensionForSpringFrameWork/CS5098 GitHub Wiki

[Topic] Error Name

stackoverflow

What is it?

@Entity
public class UserDetails {

@Id
@GeneratedValue(strategy = GenerationType.AUTO)
private long id;

....
@OneToOne(cascade = CascadeType.ALL)
private UserOffer userOffer;
..... 
//getters and setters
----------------------------------------------------
@Entity
public class UserOffer {
@Id
@GeneratedValue(strategy = GenerationType.AUTO)
private long id;

.....
@OneToOne(cascade= CascadeType.ALL)
private DetailsOffer detailsOffer;
.....

----------------------------------------------------
@Entity
public class DetailsOffer {

@Id
@GeneratedValue(strategy = GenerationType.AUTO)
private long id;

@OneToMany(cascade = CascadeType.ALL, mappedBy="detailsOffer")
private List<Product> products;

----------------------------------------------------
@Id
@GeneratedValue(strategy = GenerationType.AUTO)
private long id;

private PetType petType;
private int petNumber;
@ElementCollection
private List<String> goodies;
private String petDescribtion;
private BigDecimal price;

Why does it happen?

Solution

@ManyToOne
@JoinColumn(name = 'id_details_offer')
private DetailsOffer detailsOffer;
⚠️ **GitHub.com Fallback** ⚠️