-->
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.  [ 5 posts ] 
Author Message
 Post subject: Generics support question
PostPosted: Mon Feb 28, 2005 8:49 pm 
Regular
Regular

Joined: Fri Oct 01, 2004 2:19 am
Posts: 111
Location: Melbourne, Australia
I've had a look at the documentation and the road map and I cannot
get a clear sense whether generic collections are fully implemented
in Hibernate 3.

Could someone please clarify for me: can I use code like
Code:
public class SomeClass
{
    private Set<SomeObject> theCollection;
   ...


and what implications does this have on mappings?

_________________
Cheers,

Bonny

please don't forget to rate :)


Top
 Profile  
 
 Post subject:
PostPosted: Mon Feb 28, 2005 9:16 pm 
Hibernate Team
Hibernate Team

Joined: Sun Sep 14, 2003 3:54 am
Posts: 7256
Location: Paris, France
They are already supported. Actualy they were since the early ages of Hibernate ;-)
You still have to explicit the target class in your xml mapping however (not in annotations).

_________________
Emmanuel


Top
 Profile  
 
 Post subject:
PostPosted: Tue Mar 01, 2005 1:48 am 
Senior
Senior

Joined: Tue Mar 02, 2004 6:17 pm
Posts: 151
emmanuel wrote:
They are already supported. Actualy they were since the early ages of Hibernate ;-)
You still have to explicit the target class in your xml mapping however (not in annotations).


Emmanuel,

I am not clear on your reply. Are you saying that when using Generics as bonnyr suggested you *must* specify "SomeObject" in your mapping but it is not currently possible to do so via the annotations extension? If so, are there plans to add support for this?

Thank you,
Gili


Top
 Profile  
 
 Post subject:
PostPosted: Tue Mar 01, 2005 4:27 am 
Regular
Regular

Joined: Thu Nov 13, 2003 2:55 am
Posts: 71
Location: Sweden
cowwoc wrote:
I am not clear on your reply. Are you saying that when using Generics as bonnyr suggested you *must* specify "SomeObject" in your mapping but it is not currently possible to do so via the annotations extension? If so, are there plans to add support for this?

I believe what he is saying is: for annotations you don't have to. The class information is already present in the property.


Top
 Profile  
 
 Post subject:
PostPosted: Tue Mar 01, 2005 12:52 pm 
Hibernate Team
Hibernate Team

Joined: Sun Sep 14, 2003 3:54 am
Posts: 7256
Location: Paris, France
Yes that's what I meant

_________________
Emmanuel


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