cayenne-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From yongbl <>
Subject Re: Common attributes in the model
Date Tue, 19 Jun 2007 16:50:26 GMT
Hi Malcolm,
  Is there a need to create DBEntity and ObjEntity for the superclass? 

Malcolm Edgar <> wrote:
  Hi James,

Yes you can. In the modeler, you define a common "Custom Superclass" under
the DataMap "Entity Defaults". Make sure you custom superclass extends
DataObject, and add your common attributes. You generated classes will then
extend your common superclass.

Make sure your DB Entities support these attributes.

regards Malcolm Edgar

On 6/18/07, yongbl wrote:
> Hi,
> I am new to Cayenne. In many of the models that I am using, there are
> common attributes like created date, modified date, created by, etc. Is
> there a right way to add the common attributes, other than manually adding
> the common attributes in the models?
> It seems that I can't create a base model with the common attributes,
> and extend the rest of the models from the base model, right?
> Regards,
> James
> ---------------------------------
> Yahoo! Movies - Search movie info and celeb profiles and photos.

 Real people. Real questions. Real answers. Share what you know.
  • Unnamed multipart/alternative (inline, 8-Bit, 0 bytes)
View raw message