posted 16 years ago
I have a legacy application which we are migrating to hibernate and
I have a situation where a non peristable POJO extends a persistable POJO and this non persistable is passed on to an API which is then persisted using the hibernate API.
(e.g) B extends A
public createObject(A a)
{
//get hibernate sessionFactory, session
session.save(a);
}
Code which makes use of this API
public void caller(B b)
{
createObject(b);
}
This obviously is not working since hibernate is looking for a mapping for B which I do not have. Is there a way to make this work?