This might be of interest:
http://hibernate.org/200.html
Quote:
Representation Independance (done)
Hibernate was conceived as a persistence solution for POJO domain models, and that remains the focus. Occasionally, we run into people who would like to represent their persistent entities in some more dynamic way - as a map, essentially. Hibernate3 lets you represent your domain model as trees of maps, or, with a little bit of user-written code, as just about anything.
<dynamic-class> mappings, to allow a persistent HashMap
support for "named" entities, so different instances of the same class may be persisted to several tables
user-extension framework in the property and proxy package
In particular, Hibernate now supports the mapping of dom4j XML trees directly to the relational database.
query XML directly using HQL or the Criteria query API
make XML data persistent via the Session API
replicate data between systems using XML as an intermediate format, together with the replicate() operation
You will have a lot of problems generically saving POJO instances in the traditional sense, even if you require strict naming conventions. However, if you can serialize an object tree in XML and use this new facility to save and load it as a tree of HashMaps, then that would be a real quick and dirty persistence solution (even more so if it created its own tables on the fly).
- Jesse