Oleg,

Thanks, I'm looking to use the sqlmeta._creating flag to implement the behaivour while changing a data.

Regards.

On 11/1/05, Oleg Broytmann <phd@phd.pp.ru> wrote:
On Mon, Oct 31, 2005 at 09:16:20PM -0400, Julio O?a wrote:
> Well, this is not an error but a behavoir I need to implement.

   Sorry, I din't got it from your first mail.

> I need to write a _set_state that understand when the call was generated
> from a StatedObject(state=....) from a a.stat=....

   I see a number of approaches.

1. At the first call set an internal flag and do not allow to call the
setter when the flag is already set. Do not forget to set the flag in the
getter too.

2. Override ._create() and .set() methods; ._create() is called upon
INSERT, .set() is called for both INSERT and UPDATE.

Oleg.
--
     Oleg Broytmann            http://phd.pp.ru/            phd@phd.pp.ru
           Programmers don't die, they just GOSUB without RETURN.



--
Julio