0 Replies Latest reply on Oct 20, 2005 5:24 AM by ashok shetty

    How do I handle this scenario?

    ashok shetty Newbie

      Scenario:- Parallel development with multiple teams. Database schema is evolving / may evolve.

      Question:- How to reduce dependency & impact on development teams


        Make distinction between process logic (slsb ejb) and domain logic (belongs in model classes that are persistent). Model classes are affected due to DB schema evolution/changes.

        Have the base classes of model generated from db schema (properties and relations). Make subclasses of model the actual persistent entity.

        Development teams contribute domain related logic to the subclasses. Schema evolution primarily would mean changes to base classes. Therefore, logic in subclasses are safe from being completely overwritten.

        Problem statement:-
        Piece of cake to do this in hibernate. You can make the subclass a persistent entity. How do I achieve the same thing using annotations and EJB3?

        If I put @Entity in subclasses, I also have to put the ID annotation in the subclass , this in spite of it being present in base class. For situations like this, annotations seems like a step backwards to me.

        Any suggestions from JBOSS or community?

        Ashok Shetty