-->
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.  [ 6 posts ] 
Author Message
 Post subject: Saving a Vector in Hibernate
PostPosted: Thu Jul 15, 2004 9:52 pm 
Newbie

Joined: Tue Jul 13, 2004 5:38 pm
Posts: 10
Good day,

Does anyone know how one should map a Vector in Hibernate? I'm trying to generate a mapping file using XDoclet, but tried @hibernate.list, @hibernate.collection etc. Nothing seems to do the trick - The generated Hibernate mapping files look good; DDL looks good, but I get CGLIB related errors when trying to persist the objects.

I searched the web and tried many samples, but no luck so far on finding anyone who tried persisting a Vector...?

Any advice would be great.

If anyone could point to a good resource for XDoclet - Hibernate tag documentation that would also be great.

Someone should write a book about this stuff.

Thanks,
Jacobus


Top
 Profile  
 
 Post subject:
PostPosted: Fri Jul 16, 2004 2:50 am 
Hibernate Team
Hibernate Team

Joined: Tue Aug 26, 2003 12:50 pm
Posts: 5130
Location: Melbourne, Australia
Use Java2 Collections API. (We are at Java 5 soon.)


Top
 Profile  
 
 Post subject:
PostPosted: Fri Jul 16, 2004 9:23 am 
Newbie

Joined: Tue Jul 13, 2004 5:38 pm
Posts: 10
Thanks Gavin. I'm not quite sure what you mean or how I should go about implementing the mapping, but I'll have a look at the Java 2 Collections API.

Thanks again!

P.s. I'm reading the Hibernate book you are working on through Manning and it's a neat piece of work. An example with XDoclet would come in handy in the Tools chapter.

_________________
Be good, be happy and be nice to woman and children


Top
 Profile  
 
 Post subject:
PostPosted: Fri Jul 16, 2004 9:58 am 
Hibernate Team
Hibernate Team

Joined: Sun Sep 14, 2003 3:54 am
Posts: 7256
Location: Paris, France
Vector is a legacy collection. It has been completly been redesigned by Sun for the JDK 1.2 (aka Java 2). In a word, don't use vector.

_________________
Emmanuel


Top
 Profile  
 
 Post subject:
PostPosted: Sat Jul 17, 2004 4:38 am 
Newbie

Joined: Tue Jul 13, 2004 5:38 pm
Posts: 10
Thanks all


Top
 Profile  
 
 Post subject:
PostPosted: Sat Jul 17, 2004 11:59 am 
Regular
Regular

Joined: Tue Sep 30, 2003 11:27 am
Posts: 60
Location: Columbus, OH, USA
You might also find this comparison between Vectors and ArrayLists helpful:
http://www.javaworld.com/javaworld/javaqa/2001-06/03-qa-0622-vector.html
Scott


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