If I am right, you want to use Map instead of java classes(POJOs) for persistence.
You can do it making few changes to your hibernate configuration and mapping files.
Configuration
By default hibernate works for POJO mode. Add the following entry in your configuration file to make it wok with maps.
Code:
hibernate.default_entity_mode = dynamic-map
Changes to be made in your mapping fileUse "entity-name" instead of or addition to "name" in the class tag
Example
Code:
<class entity-name="employee">
...
</class>
instead of
Code:
<class name="Employee">
...
</class>
You can use entity-name for relationships also to work with map of maps.