Hi Sven, We have implemented this in our project here, and it works great. Check out the following tutorial: http://db.apache.org/ojb/tutorial3.html
In particular, check out the sections titled "Extents and Polymorphism" and "Mapping Inheritance Hierarchies": http://db.apache.org/ojb/tutorial3.html#Extents and Polymorphism http://db.apache.org/ojb/tutorial3.html#Mapping Inheritance Hierarchies We are using the mapping technique where each subclass has its own table, and OJB combines them together for you. I've had so much luck with this that we have begun using polymorphic references in most of our classes. Thus, many of my classes contain fields with a type as abstract as "Document", and there are 20 different classes that implement "Document". This has been great, because I can write special handlers in my webapp that can perform operations on any Document, regardless of which subclass it is. Anyhow, enjoy! Regards, Justis Peters Oculan Corp. [EMAIL PROTECTED] [EMAIL PROTECTED] wrote: > Hi, > I want to map a table to an interface. > I have some persistent classes and their according interfaces. > I also have some decorators wich add some aspects to the persistent classes > (e.g. change listening) and also implementing their respective interface. > Now I want to save the decorators directly instead of first unwrapping them. > Since all decorators are implementing the interface, ojb should know how to > save them. > The problem is that ojb doesn't know the decorator so it throws a > ClassNotPersistenceCapableException. > > Do you have any ideas how to solve this? > > Thanks in advance, > Sven > > --------------------------------------------------------------------- > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
