spring-data tag

1 questions


1 answers
96 views
0
When storing values using JPA, how to assign a key value to a class field mapped to @AnyToOne (see Foreign Key)

EntityTo establish a relationship inside, we mapped it using the @AnyToOne annotation. For example:@Entitypublic class Book { @Id @GeneratedValue private long id; @Column private String name; @ManyToO...


© 2024 OneMinuteCode. All rights reserved.