On Tue, 2007-07-24 at 20:59 +0800, Russell Keith-Magee wrote:
> On 7/24/07, PyMan <[EMAIL PROTECTED]> wrote:
> >
> > Can anyone tell me why Django do this while using save()? :
>
> The behavior comes from the Object relational mapping (key word -
> Object). Since save() is an operation on an Obje
On 7/24/07, Russell Keith-Magee <[EMAIL PROTECTED]> wrote:
> You're not the first to suggest insert() and update() methods that
> explicity do SQL INSERT and UPDATE calls. I have a vague recollection
> that a decision was made about adding these calls, but a quick search
> in the ticket database d
On 7/24/07, Russell Keith-Magee <[EMAIL PROTECTED]> wrote:
> You're not the first to suggest insert() and update() methods that
> explicity do SQL INSERT and UPDATE calls.
FYI: both, SQLite and MySQL support REPLACE statement to do this automatically.
--~--~-~--~~~--
On 7/24/07, PyMan <[EMAIL PROTECTED]> wrote:
>
> Can anyone tell me why Django do this while using save()? :
The behavior comes from the Object relational mapping (key word -
Object). Since save() is an operation on an Object relational mapper,
it was established as an unambiguous mechanism to ge
Can anyone tell me why Django do this while using save()? :
1) do select
2) if found do update
3) else do insert
In both case (insert or update) it ends in 2 steps.
It could be so :
1) Do insert
2) If ok then stop (1 step)
3) else if error because of PK's dupkey then do update (2 step only in
5 matches
Mail list logo