I'm new to hibernate, as you'll soon see. I apologize if this question has an easy answer, but I'm just not familiar enough with all of the terminology to find it easily.
Let's say I have a base class "A" and one subclass "B" that I'm mapping with Hibernate, perhaps using the table per subclass strategy. The base class is not abstract. All Bs are As, but not all As are Bs. This is reflected in the database, where table B references table A.
Ok, now suppose I have a program of some sort that displays a list of A objects. The user can select any A object and be taken to a screen to modify it...BUT, if the A object is also a B, the screen will allow the user to modify B instead of just A.
How in the world do I approach this?
Note: I'm not asking about how to determine what class an object is. What I'm asking is how do I get hibernate to return a list of objects that are of the proper class.