#Spring object contains common-use object in same table ?\\\\\\\

3 messages · Page 1 of 1 (latest)

ionic thunder
#

I have this object, i plan to have information in many instances but i do not want a relationship, i want it to be AS part of the parent object without a table for information, but for it to be included in the same table's as what their parent is, how do i stop this erro?

@Entity
@Data
@NoArgsConstructor
@AllArgsConstructor
@Table(name = "Credentials")
public class Credentials {

  @Id
  @GeneratedValue(strategy = GenerationType.IDENTITY)
  @Column(unique = true)
  private UUID id;

  @Column(unique = true, nullable = false)
  private String originalEmail;

  @Column(unique = true, nullable = false)
  private String currentEmail;

  @Column(unique = true, nullable = false)
  private String password;

  @Column(nullable = false)
  private Information information;

@Data
@NoArgsConstructor
@AllArgsConstructor
public class Information
{

  public LocalDateTime creation;
  @Column(nullable = true)
  public LocalDateTime last_updated;
  public Long version = 0L;

error: 'Basic' attribute type should not be 'Information'

digital gustBOT
#

This post has been reserved for your question.

Hey @ionic thunder! Please use /close or the Close Post button above when you're finished. Please remember to follow the help guidelines. This post will be automatically closed after 300 minutes of inactivity.

TIP: Narrow down your issue to simple and precise questions to maximize the chance that others will reply in here.