cayenne-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Aristedes Maniatis <...@ish.com.au>
Subject Re: Update in cascade
Date Fri, 01 Aug 2008 13:27:56 GMT

On 01/08/2008, at 10:05 PM, Francois Eyl wrote:

> What I need is, to change the Name (PK) value of my object, and here  
> I need to change the Name in every related object. But I need to do  
> this on the same SQL transaction.

The question you'll probably get back from many people is: why are you  
trying to change the PK of the object? That is supposed to be the one  
immutable property of the object. If you are changing the PK of  
existing objects in your database, you may need to rethink your  
strategy. On the whole, avoid using meaningful data as the primary key  
and your job will be much simpler. Cayenne gives you a range of  
options to automatically create nearly sequential primary keys.

Ari Maniatis



-------------------------->
ish
http://www.ish.com.au
Level 1, 30 Wilson Street Newtown 2042 Australia
phone +61 2 9550 5001   fax +61 2 9550 4001
GPG fingerprint CBFB 84B4 738D 4E87 5E5C  5EFA EF6A 7D2E 3E49 102A



Mime
View raw message