How do you map a “Map” in hibernate using annotations?

后端 未结 4 1774
暗喜
暗喜 2020-11-29 03:47

Using annotations how do you map a field in an entity which is a \"Map\" (Hashtable) of String to a given object? The object is annotated and instances of it are already s

4条回答
  •  借酒劲吻你
    2020-11-29 04:10

    You should probably use a UserType or UserCollectionType. Or, you can use a custom tupleizer.

    see hibernate core documentation for the concepts and hibernate annotations documentation for the equivalent annotation approach.

    Let me know if that isn't what you are asking for.

提交回复
热议问题