Junior — Senior
Defining the relationship between entities A and B through JPA
livecode
Task condition
Given two entities A and B. It is required to define one of the possible associations between them using JPA annotations.
@Entity
class A {
@Id Long id;
// here should be specified the relationship with B
}
@Entity
class B {
@Id Long id;
}