source: src/main/java/com/example/baza/model/EOd.java

Last change on this file was ed20c2c, checked in by HumaSejdini <humasejdini12@…>, 2 years ago

Initial commit

  • Property mode set to 100644
File size: 979 bytes
Line 
1package com.example.baza.model;
2
3import javax.persistence.*;
4
5@Entity
6@Table(name = "e_od", schema = "project")
7public class EOd {
8 @EmbeddedId
9 private EOdId id;
10
11 @MapsId("idKnigi")
12 @ManyToOne(fetch = FetchType.LAZY, optional = false)
13 @JoinColumn(name = "id_knigi", nullable = false)
14 private Knigi idKnigi;
15
16 @MapsId("idNaKategorija")
17 @ManyToOne(fetch = FetchType.LAZY, optional = false)
18 @JoinColumn(name = "id_na_kategorija", nullable = false)
19 private Kategorija idNaKategorija;
20
21 public Kategorija getIdNaKategorija() {
22 return idNaKategorija;
23 }
24
25 public void setIdNaKategorija(Kategorija idNaKategorija) {
26 this.idNaKategorija = idNaKategorija;
27 }
28
29 public Knigi getIdKnigi() {
30 return idKnigi;
31 }
32
33 public void setIdKnigi(Knigi idKnigi) {
34 this.idKnigi = idKnigi;
35 }
36
37 public EOdId getId() {
38 return id;
39 }
40
41 public void setId(EOdId id) {
42 this.id = id;
43 }
44}
Note: See TracBrowser for help on using the repository browser.