cayenne-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Gilberto C. Andrade" <gilbert...@gmail.com>
Subject Re: Cayenne POJO inheritance
Date Mon, 10 Aug 2009 17:49:18 GMT
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

Mime
View raw message