posted 18 years ago
2 DB tables - EMPLOYEE, PERSON
2 Classes - EMPLOYEE, PERSON
Employee extends Person
Mapping document for Employee.hbm.xml shows Employee as a subclass:
<joined-subclass name="Employee" table="EMPLOYEE" extends="Person">
<key column="guid_id" />
There are 50,000 PERSON records, but only 10,000 EMPLOYEE records.
The query is "from PERSON p"
It creates the SQL join correctly, except that it adds (+) at the end - which effectively renders the join useless, and it returns all 50,000 records.
I am sure I am missing something very basic.
Any takers?
thx
Josh