-->
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: Mapping a HashMap
PostPosted: Sat Nov 22, 2003 8:53 pm 
Newbie

Joined: Sat Nov 22, 2003 8:42 pm
Posts: 9
Hello,
I'm trying to map a class (call it 'ItemsMap') which has a java.util.Map attribute (call it 'items'). My problem is that the element type I'm trying to use is another class (call it 'Item') which I have mapped in a separate hbm.xml file. I have tried using the 'class' attribute of <element> but the SchemaGenerator seems to ignore it and create an association table with a column called 'item' with varchar(255) (on MySql 4). Could you give me a simple example form mapping this king of association??
Thanks a lot, and let me tell you Hibernate is a really great tool!!!!

Andr


Top
 Profile  
 
 Post subject:
PostPosted: Sat Nov 22, 2003 10:37 pm 
Hibernate Team
Hibernate Team

Joined: Tue Aug 26, 2003 12:50 pm
Posts: 5130
Location: Melbourne, Australia
Use <one-to-many>, not <element>


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.