Bugs item #3009526, was opened at 2010-05-31 19:45
Message generated for change (Comment added) made by phd
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=540672&aid=3009526&group_id=74338
Please note that this message will contain a full copy of the comment thread,
including the initial issue submission, for this request,
not just the latest update.
Category: Postgres
Group: SQLObject release (specify)
Status: Open
Resolution: None
Priority: 5
Private: No
Submitted By: Philipp (philipp777)
>Assigned to: Oleg Broytman (phd)
Summary: cannot delete objects when many-to-many still none
Initial Comment:
I have objects with many-to-many relationships. However it may happen that none of these relationships was set, when I want to delete one of the objects. Python returns the following error:
psycopg2.ProgrammingError: relation "none" does not exist
I fixed it by inserting:
if join.intermediateTable:
In function destroySelf() before starting the SQL query to delete the entry in the intermediate table. Which apparently is not created if no many-to-many relationship have been set. Another approach would be to make sure that an intermediate table exists even when there are still no entries defined. This would probably be more secure if other functions also assume that this table already exists.
SQLObject version 12.3, Python 2.6, Postgres 8.4
----------------------------------------------------------------------
>Comment By: Oleg Broytman (phd)
Date: 2010-06-18 12:10
Message:
Can you write a short script to demonstrate the problem? I will turn it
into a test case. Thanks in advance.
----------------------------------------------------------------------
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=540672&aid=3009526&group_id=74338
|