Hi,

today I tried to change my model to have the following:

- a base class that implements net.sf.hibernate.Lifecycle
- adds another custom method that should also be implemented
  in this class
- adds no attributes

If I model this as a base class, I get errors while generating
the sources. I have to specify the <<Entity>>-stereotype on the
base class so this error goes away. But this gives me all kinds
of problems with the different inheritance-strategies you can have
with hibernate. I have to say that nothing worked as expected.
(I don't know if this is broken in the andromda/spring cartridge or
if I'm simply to stupid to grasp the concepts and use it correctly)

Having <<Entity>> on my baseclass gives me a extra table that I don't
want. Also the mappings in applicationContext.xml are not correct
if I set "concrete" for inheritance, my derived class is missing.
"subclass" is not an option, as I just want to add 5 methods
that work the same for each derived class.
I could live with the extra table.

If I move my methods to an interface and model this accordingly (although
I now have to implement the methods in every derived class) the
interface get's not picked up in code-generation. I have to overwrite
one of the methods in the UML so the Impl class is generated and
I can change the signature to also include my interface and add all
the methods.


This gives me the sourcecode to solve my requirements but looks not very
nice in my model.

Am I doing something wrong or do I have to stay with this kind
of workaround?

Jan



-------------------------------------------------------
SF email is sponsored by - The IT Product Guide
Read honest & candid reviews on hundreds of IT Products from real users.
Discover which products truly live up to the hype. Start reading now.
http://ads.osdn.com/?ad_id=6595&alloc_id=14396&op=click
_______________________________________________
Andromda-user mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/andromda-user

Reply via email to