Hibernate version: 2.0.0.Beta1
Name and version of the database you are using: SQL Server 2005
I am using joined-subclass to define Customer inherits Person. I have written a SP GetCustomers = select * from customer.
Am executing this SP through session.GetNamedQuery to return Customer. This throws QueryException and shows up something like IndexOutofBounds for columns in Person table which is the parent class/table.
If I modify the SP and include fields from person table (parent table) then session.GetNamedQuery works fine. Is this expected behaviour ?
For querying, even with joined-subclass, I would imagine support for both scenarios viz
1. fetching just the child table data and filling the corresponding child class fields leaving the parent class fields null
2. fetching both the child and parent tables and filling the whole child entity
Any comments ?
|