JPA Map mapping

后端 未结 4 2171
孤城傲影
孤城傲影 2020-12-03 04:53

How can I map a Map in JPA without using Hibernate\'s classes?

4条回答
  •  挽巷
    挽巷 (楼主)
    2020-12-03 05:11

    Does not the following work for you?

    @ManyToMany(cascade = CascadeType.ALL)
    Map entitytMap = new HashMap();
    

    EntityType could be any entity type, including a String.

提交回复
热议问题