-->
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: I need two Set instead of one
PostPosted: Fri Nov 19, 2004 5:26 pm 
Regular
Regular

Joined: Sat May 29, 2004 2:16 pm
Posts: 81
I browsed the book and the reference, but cant find a way out (besides perhaps creating a UserType like in pg 203, which i'm not ready for now).

Suppose user wants to store her collection of favorite players, from a given choice.
Also he wants to store injured players apart.

So, i build class Player, with id, name, accessors. From my view point i need two sets:
Set myPlayers = new HashSet;
Set injuredPlayers = new HashSet;

My problem: how can i persist this second Set?
If i try to store injuredPlayer as String all is fine, but if i try to store it as Player - therefore creating a InjuriedPlayer class, i get a configuring error because "Player" isnt a recognized type!!
But when i persist myPlayers to Player class everything goes fine.
It seems i cant find a solution to this, anywhere in book or reference.

So, how can i store Player type objects in two (or more) diferent Set?

thanks in advance


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.