Michael Bayer wrote:
> OK this test program is working correctly.
>
> the mapper setup you are trying is:
>
> mapper(T1, t1)
> mapper(T2, t2,
> properties={'t1':relation(T1, backref='t2s', private=True)}
> )
>
> and then the deletion looks like:
>
> UPDATE t2 SET t1_id=? WHERE t2.id = ?
>
OK this test program is working correctly.
the mapper setup you are trying is:
mapper(T1, t1)
mapper(T2, t2,
properties={'t1':relation(T1, backref='t2s', private=True)}
)
and then the deletion looks like:
UPDATE t2 SET t1_id=? WHERE t2.id = ?
[None, 2]
UPDATE t2 SET t1_id=? WHERE t2.id = ?
oh, woops, i forgot to get to this one :) ill check it out now.
On Jul 20, 2006, at 11:36 AM, Randall Smith wrote:
> Randall Smith wrote:
>> Michael Bayer wrote:
>>
>>> On Jul 18, 2006, at 5:54 PM, Randall Smith wrote:
>>>
>>>
SQLError: (IntegrityError) null value in column "project_id"
>
Randall Smith wrote:
> Michael Bayer wrote:
>
>> On Jul 18, 2006, at 5:54 PM, Randall Smith wrote:
>>
>>
>>> SQLError: (IntegrityError) null value in column "project_id" violates
>>> not-null constraint
>>> 'UPDATE planreview.documents SET project_id=%(project_id)s WHERE
>>> documents.id = %(docu
Michael Bayer wrote:
On Jul 18, 2006, at 5:54 PM, Randall Smith wrote:
SQLError: (IntegrityError) null value in column "project_id" violates
not-null constraint
'UPDATE planreview.documents SET project_id=%(project_id)s WHERE
documents.id = %(documents_id)s' {'project_id': None,
'documents_
Michael Bayer wrote:
> On Jul 18, 2006, at 5:54 PM, Randall Smith wrote:
>
>
>>SQLError: (IntegrityError) null value in column "project_id" violates
>>not-null constraint
>> 'UPDATE planreview.documents SET project_id=%(project_id)s WHERE
>>documents.id = %(documents_id)s' {'project_id': None,
On Jul 18, 2006, at 5:54 PM, Randall Smith wrote:
>
> SQLError: (IntegrityError) null value in column "project_id" violates
> not-null constraint
> 'UPDATE planreview.documents SET project_id=%(project_id)s WHERE
> documents.id = %(documents_id)s' {'project_id': None,
> 'documents_id': 13}
>
I'm getting unexpected behavior when deleting a record with a foreign
key. I'm using the 0.2.5 rev 1712. When I delete a record that has a
private=True attribute in the FK relationship, SA tries to update the
record and set the FK to NULL instead of deleting the record.
Applicable code. I tr
8 matches
Mail list logo