costi2times wrote:
Suppose we have some classes in our application domain. But we don't want them to be "tied" to a particular persistence framework. These classes should just express the particulars of the domain concepts....no ID's, no mappings, no annotations; To implement persistence on this domain, how about deriving these classes, and applying hibernate (for example, or any other ORM) mapping files (or annotations) on the DERIVED classes ? Is this possible ? Can you apply mappings on inherited fields ?
10x
inheriting fields is no problem, of couse. so you can do that.
but anyway, if you use Pojo's you are already independent of the persistence framework. That's the idea about Pojo's.