Re: Specifying DB table names for intermediate table in an M2M relation?

2006-07-20 Thread Marc de Graauw
Geta wrote: > What's the easiest way to have Django use an existing table for the > intermediate table for a ManyToManyField? In PostgreSQL you could try to: - let Django create its m2m table - drop it - recreate it as a view on your original m2m table - create an rule 'AS ON INSERT ... DO INSTE

Re: Specifying DB table names for intermediate table in an M2M relation?

2006-07-19 Thread Malcolm Tredinnick
On Wed, 2006-07-19 at 22:56 +, Geta wrote: > What's the easiest way to have Django use an existing table for the > intermediate table for a ManyToManyField? I have a legacy database, > with two tables and an intermediate table for the M2M relationship > between them -- all these are pretty s

Re: Specifying DB table names for intermediate table in an M2M relation?

2006-07-19 Thread Russell Keith-Magee
On 7/20/06, Geta <[EMAIL PROTECTED]> wrote: I know you canspecify META.db_table to specify database table names and db_column forfield names, but I couldn't see where/if this could be set for aManyToManyField -- is it possible? There isn't a simple way to do this - however, if you're feeling advent

Specifying DB table names for intermediate table in an M2M relation?

2006-07-19 Thread Geta
What's the easiest way to have Django use an existing table for the intermediate table for a ManyToManyField? I have a legacy database, with two tables and an intermediate table for the M2M relationship between them -- all these are pretty similar to what Django would create, but the table and c