-->
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: Creating a Map<String, Set>
PostPosted: Tue Jan 17, 2006 5:39 pm 
Newbie

Joined: Tue Jan 17, 2006 5:21 pm
Posts: 3
Hibernate version:3.1

Mapping documents:
I've got 3 tables:

Department [department_id,name]
Category_Department [category_id, department_id]
Category[category_id, category_group, name]

category_group can and is repeted in this table and is ment to create a grouping. For example:

DATA ROWS:
1, SUBJ, English
2, SUBJ, Science
3, SUBJ, Math




Name and version of the database you are using:Oracle9i

Is it possible to create an annotation that will allow for the following structure in the Department object ?

public Set getCategory( String catGroup ) {

return categories.get( catGroup );

}


public void setCateogries(Map<String, Set> categories) {

this.categories = categories;

}

Where the Map (HashMap) contains a String
@MapKey(name="category_group")

And the Set<Category> is a all the categories in that group for the department.

If this is not possible in annotations how can it be done in XML?
How can you use both annotations and XML configuration?

Thanks!
Josh
New York University


Top
 Profile  
 
 Post subject:
PostPosted: Tue Jan 17, 2006 7:28 pm 
Hibernate Team
Hibernate Team

Joined: Sun Sep 14, 2003 3:54 am
Posts: 7256
Location: Paris, France
Map with join tables is not yet supported

_________________
Emmanuel


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