The <dynamic-component> element allows a Map to be mapped as a component, where the property names refer to keys of the map.
Code:
<dynamic-component name="userAttributes">
<property name="foo" column="FOO"/>
<property name="bar" column="BAR"/>
<many-to-one name="baz" class="eg.Baz" column="BAZ"/>
</dynamic-component>
Read chapter 5.1.12. : component, dynamic-component
http://www.hibernate.org/hib_docs/refer ... -component
and chapter 7.5: Dynamic components
http://www.hibernate.org/hib_docs/refer ... ts-dynamic
Let me know it this helps you solve your problem.
Vincent Giguère