-->
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: SET with SORT criteria only showing one element?
PostPosted: Sat May 06, 2006 11:04 am 
Beginner
Beginner

Joined: Thu Oct 20, 2005 9:26 am
Posts: 27
Location: Barcelona
Hi,

I have implemented a sorted collection like this:
...
<set name="CompleteSolutions" cascade="all" sort="Business.Data.SolutionComparer, Business">
<key column="QuestionId" />
<one-to-many class="Business.Data.CompleteSolution, Business"></one-to-many>
</set>
- mapped to an ISet in the business entity
...

But it only gets me one object, although there are several in the database.

I tried to use a bag instead like this:

<bag name="CompleteSolutions" cascade="all">
<key column="QuestionId" />
<one-to-many class="Business.Data.CompleteSolution, Business"></one-to-many>
</bag>
- mapped to an IList in the business entity.

And this gets me all the objects, but obviously not sorted the way I wanted.
Anyone know why this might be?

/David


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:
cron
© Copyright 2014, Red Hat Inc. All rights reserved. JBoss and Hibernate are registered trademarks and servicemarks of Red Hat, Inc.