Persist collection of interface using Hibernate

前端 未结 3 1965
隐瞒了意图╮
隐瞒了意图╮ 2020-12-01 05:44

I want to persist my litte zoo with Hibernate:

@Entity
@Table(name = \"zoo\") 
public class Zoo {
    @OneToMany
    private Set animals = new          


        
3条回答
  •  春和景丽
    2020-12-01 05:48

    I think you have to annotate the interface too with @Entity and we have to annotate @Transient on all getters and setters of interface.

提交回复
热议问题