-->
These old forums are deprecated now and set to read-only. We are waiting for you on our new forums!
More modern, Discourse-based and with GitHub/Google/Twitter authentication built-in.

All times are UTC - 5 hours [ DST ]



Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 1 post ] 
Author Message
 Post subject: CollectionMetadata vs. PersistentCollectionType
PostPosted: Sun Jan 25, 2004 6:10 pm 
Beginner
Beginner

Joined: Sun Oct 26, 2003 11:21 pm
Posts: 27
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!


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 1 post ] 

All times are UTC - 5 hours [ DST ]


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
© Copyright 2014, Red Hat Inc. All rights reserved. JBoss and Hibernate are registered trademarks and servicemarks of Red Hat, Inc.