Hi all. I'm wondering if anyone uses CollectionMetadata? I'm trying to figure out what it's meant to be used for, as opposed to the Type for the particular property that is the collection.
It looks to me like you need the PersistentCollectionType to get a full picture of what the collection looks like. But the CollectionMetadata gives some usefull information too.
For instance, CollectionMetadata will tell you if it's got an index and if it's an array or not. But to figure out if an indexed collection that is not an array is really a Map or a List, you need to check the actual class of the Type (is it a MapType or ListType). I need to know this because there's no adapter in Hibernate that will turn an indexed collection into a Map or into a tuple (Object[] indexes, Object[] elements).
I'm doing generic processing over the information received by an Interceptor, which is dead simple except for collections.
Thanks!
|