Hello Carlo.
Asgaar wrote:
Ok, it seems that with my template i instruct only the javabasic cartridge to generate interfaces without any specific stereotype... however it is necessary to instruct also the Hibernate cartridge to generate correct inheritance mapping files for those classes that implement the interface...
The Hibernate Cartridge only generates correct mappings for class-(inheritance).
So, maybe you can change your domain model?
If you model the document as a class and the document and project as subclasses, the Java classes
and Hibernate mappings should be generated correctly.
Asgaar wrote:
Can someone give me some hints and guidance on which templates should be modified in hibernate cartridge in order to model interfaces?
The Hibernate Cartridge has no big Intterface support. If you draw an implementation relation from an
entity 'EntityA' to an interface 'InterfaceA' , the interface of 'EntityA' will be extendet by 'InterfaceA'.
Thats all. No mapping is generated. It will be hard to change the bavahior of the Hibernate Cartridge
to take care of interfaces. There are two possibilities:
1. Modeltransformation: In front of the Hibernate Cartridge you can transform all needed interfaces to
Classes.
2. Or you have to extend the Cardridge. All the relevant mappings have to be defined also for interfaces.
Did I help you?
Regards
Darius