I need to extend a class A with a few attributes in a separate table, so I chose the joined-subclass model. Let say I have a basic application managing Table A and class A and additionnal modules. The basic application is the one creating objects and additionnal modules add attributes if and when needed.
So if table A contains an entry with a key "1" and if I want to add attribute in module B, can I just do the folowing ?
Code:
ClassB b= new ClassB();
b.setKey(1);
add attributes to b and then
Code:
session.saveOrUpdate(b);
if not how would I do it?
Philippe
Hibernate version: Hibernate version 3.1
Mapping documents: Code:
<joined-subclass extends="ClassA" table="AB" name="ClassB" lazy="true" >
Code between sessionFactory.openSession() and session.close():
Full stack trace of any exception that occurs:
Name and version of the database you are using:
The generated SQL (show_sql=true):
Debug level Hibernate log excerpt: