-->
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.  [ 5 posts ] 
Author Message
 Post subject: How to do the mapping for NavigableMap<K,V>?
PostPosted: Sat Feb 28, 2009 9:15 pm 
Newbie

Joined: Mon Jun 27, 2005 4:22 am
Posts: 10
Location: Hyderabad, India
Hi,

I would like to know how to do the mapping for NavigableMap<K,V>?

I have done the mapping for SortedMap<K, V>. But don't know how to do it for NavigableMap<K,V>.

Any help will be appreciated? When i tried to replace SortedMap<K,V> with NavigableMap<K,V> , i am getting the following error.

ERROR BasicPropertyAccessor:98 - expected type: java.util.NavigableMap, actual value: org.hibernate.collection.PersistentSortedMap

There seems i need to use something different for mapping a NavigableMap, like i used the sort attribute and order-by attribute of the Map tag to convert it from Map<K,V> to SortedMap<K,V>.

Similarly what should i do to map a NavigableMap<K,V>? Please explain.

Thanks,
Amjath Sharief


Top
 Profile  
 
 Post subject:
PostPosted: Mon Mar 02, 2009 4:31 am 
Expert
Expert

Joined: Fri Jan 30, 2009 1:47 am
Posts: 292
Location: Bangalore, India
I think for this you will have to implement a org.hibernate.usertype.UserCollectionType and then specify the collection-type attribute in the map tag.

_________________
Regards,
Litty Preeth


Top
 Profile  
 
 Post subject:
PostPosted: Mon Mar 02, 2009 4:39 am 
Expert
Expert

Joined: Thu Jan 08, 2009 6:16 am
Posts: 661
Location: Germany
NavigableMap is a new kind of map since Java 6. Hibernate is not designed for Java 6, yet, so I would not use it in my entities until Java 6 is supported by hibernate.

_________________
-----------------
Need advanced help? http://www.viada.eu


Top
 Profile  
 
 Post subject: Re: How to do the mapping for NavigableMap<K,V>?
PostPosted: Wed Feb 03, 2010 11:40 am 
Beginner
Beginner

Joined: Tue Aug 25, 2009 11:42 am
Posts: 49
I am however wondering how Hibernate will be able to incorporate NavigableMap/NavigableSet and remain backward compatible.
For Hibernate's PersistentSortedMap:
<map name="something" sort="natural">
Now would we expect future 1.6 collections embracing Hibernate to give a new PersistentNavigableMap for the same mapping?


Top
 Profile  
 
 Post subject: Re: How to do the mapping for NavigableMap<K,V>?
PostPosted: Fri Jun 10, 2011 11:14 am 
Newbie

Joined: Fri Jun 10, 2011 11:12 am
Posts: 1
So . . . we're two years on and still no support for NavigableMap?


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

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.