Hirdetés
Új hozzászólás Aktív témák
-
#39560925
törölt tag
Először is itt egy működő példa |Movies2Actors| *----1 |Movies|:
MoviesEntity class:
@JsonIgnore
private List<Movies2ActorsEntity> characters;
@JsonIgnore
private List<GenresEntity> genres;
...
@OneToMany(mappedBy = "movie")
public List<Movies2ActorsEntity> getCharacters() {
return characters;
}
@OneToMany(mappedBy = "movie")
public List<GenresEntity> getGenres() {
return genres;
}Movies2ActorsEntity class:
private int m2aid;
private int movieid;
private int actorid;
private String asCharacter;
private ActorsEntity actor;
private MoviesEntity movie;
...
@Id
@Column(name = "m2aid", nullable = false, insertable = true, updatable = true)
public int getM2aid() { return m2aid; }
@ManyToOne
@JoinColumn(name = "movieid", referencedColumnName = "movieid", nullable = false)
public MoviesEntity getMovie() {
return movie;
}És akkor a |Genres| *----1 |Movies|
GenresEntity:
private int movieid;
private String genre;
private int genreId;
@JsonIgnore
private MoviesEntity movie;
...
@Id
@Column(name = "genreId", nullable = false, insertable = true, updatable = true)
public int getGenreId() {
return genreId;
}
@ManyToOne
@JoinColumn(name = "movieid", referencedColumnName = "movieid", nullable = false)
public MoviesEntity getMovie() {
return movie;
}
Új hozzászólás Aktív témák
A topicot kiemeltem. Valaki nem akar egy nyitó hsz-t írni?:))
- Jó ÁRON ELADÓ! Üzleti HP Elitebook 1040 G9 Laptop! / i5-1245U 16GB 256GB FHD
- Honor 400 Lite / 8/256GB / Kártyafüggetlen / 12Hó Garancia
- AKCIÓ! MacOS 26! UTOLSÓ GEN iMac 27" 5K i7-10700K 64GB RAM 512GB NVMe Radeon Pro 5700 XT 16GB gar
- 27% - ÚJ Dell Alienware AW2725DF QD-OLED Monitor! 2560x1440 / 360Hz / 0.03ms / Adaptive-Sync
- ALIENWARE Area-51 R6 Threadripper Edition 1920X
Állásajánlatok
Cég: Laptopműhely Bt.
Város: Budapest

