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.
|