Using Hibernate 3, i tried to use inheritance "Table per subclasses" with discriminant as documentation show. This done, i never get correct polymorphism using many-to-one relation or load method based on mother class ! returned instances was only mother class instances !!
May be i was wrong, but i can't see the usefullness of inheritance if it's not polymorphic at object level.
I change to "Table per subclass" but, without discriminant (first setup) and polymorphism has immediately worked like a charm ( instanceof is now working, ouf ! )
but i'm curious, did i forget something ?
|