Re: Newbie question =)

Sebastien Bigaret <[email protected]> 25 Feb 2004 22:33:58 +0100
Newsgroups gmane.comp.python.modeling
Message-ID <[email protected]>
Sebastien Bigaret <[email protected]> wrote:
> Well, I would advise you not to change anything in the validation logic.
> Even if nothing prevents you from doing this, there isn't much situation
> which requires modification of the objects graph in validation methods.
> To put it differently, i'd say that the validation logic is here to
> prevent any bug or unhandled situations to be able to corrupt objects /
> database invariants in any ways (just an advice, really, nothing in the
> framework would prevent you to change objects during the validation
> process)

However, in most cases you just cannot decide what to do if the
validation fails: suppose your validation logic fails because a person
has two default bank account, what should be done then? Randomly choose
one of them to be the default? Sounds awkward as well, doesnt it :))

-- Sébastien.



-------------------------------------------------------
SF.Net is sponsored by: Speed Start Your Linux Apps Now.
Build and deploy apps & Web services for Linux with
a free DVD software kit from IBM. Click Now!
http://ads.osdn.com/?ad_id56&alloc_id438&op=click