-->
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.  [ 2 posts ] 
Author Message
 Post subject: Problem with SortedSet, Custom Comparator and Lazy Init
PostPosted: Fri Oct 24, 2003 2:32 am 
Newbie

Joined: Tue Oct 07, 2003 9:37 am
Posts: 3
Location: KwaZulu-Natal, South Africa
This is a bit of a bazaar one as far as i'm concerned but perhaps someone may shed some light on it.

Setup:

Tomcat 4.0.x, Hibernate 1.2.5 using dbcp for pooling, Postgresql 7.3.4, j2se 1.4.x

Problem:

When using a sorted set with a custom comparitor if there is only one element in the set hibernate refuses to lazy initialise the set even after calling Hibernate.initalize(set); if there is more than one element everything works fine, only if the is one does it not get intiialized. The element gets written to the database fine. Its only on retrieval that it fails.

if i change it from being a SortedSet to just being a plain set it works fine.

This is not a comparator issue either as far as i can see as i use exactly the same comparator to sort it in my own code (as apposed to the generated classes) and it works fine.

I had a look in JIRA and didn't see anything and didn't find anything in searchs of the old forum or the current one.

any ideas?

ta

(this is just for interests sake as i'm currently working around it)

peedee


Top
 Profile  
 
 Post subject:
PostPosted: Fri Oct 24, 2003 5:08 pm 
Hibernate Team
Hibernate Team

Joined: Tue Aug 26, 2003 12:50 pm
Posts: 5130
Location: Melbourne, Australia
what happens if you use sort="natural"?


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 2 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.