cayenne-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From csergiu77 <csergi...@yahoo.com>
Subject Re: inheritance
Date Mon, 23 Mar 2009 07:29:36 GMT


Hi 
thx for answer ,glad that is possible but is till have one question.

if i start desingning the database i should add this commom fileds manually
to all tables ?

or is possible to start with objects and then generate tables ?

cause if i start with objects and for each object i create i just specify
that it extedns a class that has those common fields then is super ok .





Andrus Adamchik wrote:
> 
> Hi there,
> 
> you can use a common superclass that extends CayenneDataObject. Enter  
> it for the DataMap under "Custom Superclass" and then click "Update...".
> 
> Optionally you may declare getters and setters as abstract in this  
> superclass. Whether you do that or not, Cayenne will generate correct  
> access code in subclasses.
> 
> Andrus
> 
> 
> On Mar 21, 2009, at 9:22 PM, csergiu77 wrote:
> 
>>
>> i would like to do the folowing :
>>
>> each table that i will have into my database must have :
>>
>>
>> id
>> create_date
>> create_user_id
>> write_date
>> write_user_id
>>
>>
>> Normally i though to subclass each of my data model classes  to  a  
>> class
>> that has these fields.
>>
>> How this can be done using cayenne ?
>>
>> Thx
>> -- 
>> View this message in context:
>> http://www.nabble.com/inheritance-tp22639408p22639408.html
>> Sent from the Cayenne - User mailing list archive at Nabble.com.
>>
>>
> 
> 
> 

-- 
View this message in context: http://www.nabble.com/inheritance-tp22639408p22655366.html
Sent from the Cayenne - User mailing list archive at Nabble.com.


Mime
View raw message