-->
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: Collection of an Interface: how to map?
PostPosted: Wed Oct 25, 2006 2:42 pm 
Newbie

Joined: Fri Apr 07, 2006 10:52 am
Posts: 17
Hi,

hi have been using Hibernate for quite a while and I am very satisfied by it. I am facing a new problem today, here it is.

I have a collection that looks like this:

List<MyInterface> myElements;

MyInterface is an interface with only two known and annotation-mapped subclasses.

How can I possibly map such a collection? I can persist the single classes that implement that interface, but how can I persist a collection of an interface?

If "you cannot do this" is the answer, I would REALLY need an alternative solution. Mapping the serialized collection as a LOB would be enough for me, since I don't need to search the elements of the collection nor I need to extract them unless all of them at once.

Any suggestions? Thanks in advance for your help.


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.