JPA Multiple Embedded fields

前端 未结 4 2118
清酒与你
清酒与你 2020-11-30 01:20

Is it possible for a JPA entity class to contain two embedded (@Embedded) fields? An example would be:

@Entity
public class Person {
    @Embedd         


        
4条回答
  •  星月不相逢
    2020-11-30 01:35

    In case you are using hibernate you can also use a different naming scheme which adds unique prefixes to columns for identical embedded fields. See Automatically Add a Prefix to Column Names for @Embeddable Classes

提交回复
热议问题