Sobes.tech
Junior — Senior

Determining the type of association between JPA entities A and B

livecode

Task condition

Create one of the allowed relationships between two JPA classes A and B (for example, @OneToOne, @ManyToOne, etc.).

@Entity
class A {
    @Id
    Long identifier;

    // relationship with B?
}

@Entity
class B {
    @Id
    Long identifier;
}