Hiya,
I have spent several days trying to figure this out. I have
class User Extends Contact implements Resource, CanLogin
{
...
}
In hibernate, I map contact as the superclass and all that works fine. I also mapped canlogin (since there are other objects that can login) and that works fine.
However, mapping resource does not work as expected. I have mapped the Resource Interface and it works fine as long it is not mapped as a field from other classes.
In this case, there is another class called ResourceTransfer that needs to map using many-to-one to the Resource Interface.
When mapping to the Resource interface, an additional table is created for resource and all inserts to resourcetransfer fails since the foreign key constraint to resource fails.
If I remove this table, inserts work fine, but "from Resource" fails with table not found.
Can someone please help me resolve this?
Best Wishes,
Shri
|