Spring JPA

JPA problem:
@Entity @Setter @Getter @NoArgsConstructor
public class BicycleRider {
    @Id
    @GeneratedValue (strategy = GenerationType.IDENTITY)
    private int id;
    // timeInSeconds refers to the amount of time it took finish the three stages of the race represented in seconds.
    private double timeInSeconds;
    private int mountainPoints;
    private int sprintPoints;
    @ManyToOne (fetch = FetchType.LAZY)
    @JoinColumn(name = "bicycleteam_id")
    private BicycleTeam bicycleTeam;
}

I want to create a BicycleRiderobject and store it i my database; however, I need a BicycleTeam to associate it to. Do I need to need to create a BicycleTeamobject or do I need to do something else?
Was this page helpful?