Given the following object graph, where Author has 1 to many Books...
Author { String name Set Books }
Book { String title }
Is there an out of the box way to serialize this object graph to a HashMap e.g. key is a bean property name and value is the actual value e.g. [name="Joe", book[0].title="book 1", book[1].title="book 2"]
Is there recommended approach to this?
I know I can get to the hibernate metadata and iterate through properties etc etc. But I was hoping there would be a helper class for this. Since the databinding stuff in Spring uses this format to rebuild an object graph.... e.g. mapping a http request to domain objects...
TIA
|