source: source/MovieZilla-master/src/main/java/com/example/demo/model/Employee/EmployeeKey.java

Last change on this file was fc7ec52, checked in by darkopopovski <darkopopovski39@…>, 2 years ago

all files

  • Property mode set to 100644
File size: 585 bytes
Line 
1package com.example.demo.model.Employee;
2
3import com.example.demo.model.User;
4
5import javax.persistence.Embeddable;
6import javax.persistence.JoinColumn;
7import javax.persistence.ManyToOne;
8import java.io.Serializable;
9
10@Embeddable
11public class EmployeeKey implements Serializable {
12
13 @ManyToOne
14 @JoinColumn(name="user_id")
15 public User user;
16
17 public EmployeeKey(User user) {
18 this.user = user;
19 }
20
21 public EmployeeKey() {
22
23 }
24
25 public User getUser() {
26 return user;
27 }
28
29
30 public void setUser(User user) {
31 this.user = user;
32 }
33}
Note: See TracBrowser for help on using the repository browser.