Last change
on this file was fc7ec52, checked in by darkopopovski <darkopopovski39@…>, 2 years ago |
all files
|
-
Property mode
set to
100644
|
File size:
603 bytes
|
Line | |
---|
1 | package com.example.demo.model.Client;
|
---|
2 |
|
---|
3 | import com.example.demo.model.User;
|
---|
4 |
|
---|
5 | import javax.persistence.Embeddable;
|
---|
6 | import javax.persistence.JoinColumn;
|
---|
7 | import javax.persistence.ManyToOne;
|
---|
8 | import java.io.Serializable;
|
---|
9 |
|
---|
10 | @Embeddable
|
---|
11 | public class ClientCompositeKey implements Serializable {
|
---|
12 |
|
---|
13 | @ManyToOne
|
---|
14 | @JoinColumn(name="user_id")
|
---|
15 | public User user;
|
---|
16 |
|
---|
17 | public ClientCompositeKey(User user) {
|
---|
18 | this.user = user;
|
---|
19 | }
|
---|
20 |
|
---|
21 | public ClientCompositeKey() {
|
---|
22 |
|
---|
23 | }
|
---|
24 |
|
---|
25 | public User getUser() {
|
---|
26 | return user;
|
---|
27 | }
|
---|
28 |
|
---|
29 | public void setUser(User user) {
|
---|
30 | this.user = user;
|
---|
31 | }
|
---|
32 | }
|
---|
Note:
See
TracBrowser
for help on using the repository browser.