posted 19 years ago
I will try to explain more on my problem,
I need to represnt my child tables as child classes. Here salary table is a child table of users table. Thats the reason why i am extending UserPOJO in my SalaryPOJO.
It is working fine with all other CRUD operations expect using a select with conditions.
I would like to create an API for an application where all child table mapping POJOs will be extending its parent table POJO.
Last time i tried with <join-subclass>
but while inserting a record in child class(using session.save(Object)) its trying to insert corresponding records in its parent table.
Say while inserting a record in salary its trying to insert a corresponding record in its parent(Users) and since key for that User record is already existing its showing dupicate entry exception.
Can i avoid insertion of parent record while inserting a child record, if there is a record already existing the same primary key??
Please help me to solve my issue.
Thanking you all,,
Cheenath.