-->
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: Mapping a generic type as a property?
PostPosted: Tue Jul 17, 2007 7:46 pm 
Newbie

Joined: Sat Dec 30, 2006 3:07 pm
Posts: 16
Need help with Hibernate? Read this first:
http://www.hibernate.org/ForumMailingli ... AskForHelp


I was wondering if it was possible (and how to do it) to have a property that is a generic type.

For instance

Entity<T extends Entity2> {
T property;
}


Hibernate gives me an error when I try to do this, because T is not a mapped class.

Also acceptable would be to have


Entity {
Entity2 property;
}

But hibernate tries to instantiate the abstract class


Where Entity2 is an abstract class.

I there any reference material on how to do this?

Does anyone have another way?

Thanks

Kal


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.