Hi,
I am facing a problem related to Hibernate Mapping.
I have the following data beans:
Code:
public class A
{
int id;
String name;
}
public class B extends A
{
String address;
}
I have mapped class A with table A.
Now, I have something like:
Code:
A obj = new B();
I want to persist obj in table A (only id and name) without defining a mapping for class B. I want the extra data in obj (address) to be discarded.
If I write session.save(obj), it gives me an error saying that there is no mapping for class B.
Is it possible to persist obj without defining a mapping for B?
Regards,
Jayarama Nettar.