开发者

Using Hibernate to persist a List<Map<String, Object>>

开发者 https://www.devze.com 2023-02-22 18:21 出处:网络
I have the following Java Collection List<Map<String, Object>> I\'ve written a custom converter class which can flatten this down to a List of MyEntity (where MyEntity is basically Stri

I have the following Java Collection

List<Map<String, Object>>

I've written a custom converter class which can flatten this down to a List of MyEntity (where MyEntity is basically String, Value, Java type, parent collection) and re-assemble it back to a Map but I was wondering......

Is it possible to annotate the List such that Hibernate can persist a List of these Maps? I've had a brief look at the 开发者_运维技巧collectionOfElements annotation and I know there will be problems with the Object value due to Hibernate needed to convert to a valid database type.

Any ideas gratefully received :)

0

精彩评论

暂无评论...
验证码 换一张
取 消