I created the mapping and POJO files in Netbeans instead of writing them myself. Can a derived class be used in place of an inherited class? An example would be something like this:
Person.hbm.xml - mapping file
Person.java - generated class (strategy class per table)
PersonExtended - class that extends Person.java
So when I create a new object:
PersonExtended personextended = new PersonExtended(<parameters>);
Can I call methods like:
session.save(personextended) or session.delete(personextended)
?
Is this script reasonable or should I add the code I need to the generated class? Thanks in advance for your help or suggestions.
------- -------- Edit
In my database, I do not have a typical structure that could appear as inheritance. I just want additional methods to be separated from the main java class for the object.
Best regards, Insolence.