Legend:
- Unmodified
- Added
- Removed
-
src/main/java/project/fmo/app/projcetfmo/Model/Magacioner.java
r1dd9226 rd14176d 1 package model;1 package project.fmo.app.projcetfmo.Model; 2 2 3 import ja karta.persistence.*;3 import javax.persistence.*; 4 4 5 5 import java.util.Objects; 6 6 7 7 @Entity 8 @Table(schema = "project", name = "magacioner", catalog = "db_202223z_va_prj_fmo") 8 9 public class Magacioner { 9 @GeneratedValue(strategy = GenerationType.IDENTITY)10 10 @Id 11 11 @Column(name = "id_korisnik") 12 12 private int idKorisnik; 13 @ Basic14 @ Column(name = "id_magacin")15 private int idMagacin;13 @ManyToOne 14 @JoinColumn(name = "id_magacin") 15 private Magacin magacin; 16 16 17 17 public int getIdKorisnik() { … … 23 23 } 24 24 25 public int getIdMagacin() {26 return idMagacin;25 public Magacin getMagacin() { 26 return magacin; 27 27 } 28 28 29 public void set IdMagacin(int idMagacin) {30 this. idMagacin = idMagacin;29 public void setMagacin(Magacin magacin) { 30 this.magacin = magacin; 31 31 } 32 32 … … 36 36 if (o == null || getClass() != o.getClass()) return false; 37 37 Magacioner that = (Magacioner) o; 38 return idKorisnik == that.idKorisnik && idMagacin == that.idMagacin;38 return idKorisnik == that.idKorisnik && magacin == that.magacin; 39 39 } 40 40 41 41 @Override 42 42 public int hashCode() { 43 return Objects.hash(idKorisnik, idMagacin);43 return Objects.hash(idKorisnik, magacin); 44 44 } 45 45 }
Note:
See TracChangeset
for help on using the changeset viewer.