Created
April 24, 2019 13:26
-
-
Save vjrngn/f7d4256998f9d2e4b928e0b49c824357 to your computer and use it in GitHub Desktop.
Customer entity with updated relationship
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package com.example.demo; | |
import javax.persistence.*; | |
import java.util.List; | |
@Entity | |
@Table(name = "customers") | |
public class Customer { | |
@Id | |
int id; | |
@OneToMany(mappedBy = "customer") | |
List<Order> orders; | |
public Customer() { | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment