Thanks Tore, but my initial problem is understand Andrus's tips: 3 Run class generator to generate the _Xyz superclasses. 4 Change the existing classes by hand to inherit from _Xyz counterpart. 5 Remove existing persistence fields, and use superclass getters and setters to access them. * Change the API throughout the code to use Cayenne ObjectContext and Queries.
In my model I have this hierarchy (implemented): Pessoa->PessoaFisica Pessoa->PessoaJuridica Cayenne Modeler generated: public abstract class Pessoa extends _Pessoa public class PessoaFisica extends _PessoaFisica public class PessoaJuridica extends _PessoaJuridica and this one into auto package: public abstract class _Pessoa extends CayenneDataObject public abstract class _PessoaFisica extends Pessoa <========== HERE IS THE POINT public abstract class _PessoaJuridica extends Pessoa <========== HERE IS THE POINT Is that all ok? Shouldn't [_PessoaFisica extends Pessoa] be [_PessoaFisica extends _Pessoa ]? Gilberto
