Joined: Fri Sep 15, 2006 2:09 am Posts: 11
|
Hi.
Is it somehow possible to achieve the following?
- Generate my domain objects from .hbm files (that works so far).
- Generate an empty custom subclass that can be enhanced by additional methods/fields that won't be persisted.
Currently I've mapped my domain objects like domain.Person in the hbm files.
To achieve the 2nd step I would have to map it like domain.BasePerson and let an empty subclass be generated as domain.Person.
I also thought about using the meta tag "class-code" to add additional methods to the class. But that feels "strange" to me writing java code in hbm files :).
So, what's the best practice to achieve the custom-subclass approach?
|
|