SQL question

Giampaolo Tomassoni Giampaolo at Tomassoni.biz
Thu Jul 28 18:02:08 CEST 2011


> By the way, I didn't notice the 'quarantine' table was using an
> explicit
> composite primary key (between 'mail_id' and 'chunk_ind'). I really
> don't know how to make it work with django's orm... It smells like I'm
> going to rollback this work and finally wait for django to support
> composite keys.
> 
> Anybody here who has already try to achieve such a thing? :-)

Change that primary key to an unique index, then create a new auto-increment
column and set it as the primary key.

There is no (evident?) reason this shouldn't work with both django and
amavis...

Besides, django is not the only ORM disliking composite primaries...

Have a look at the following, from the Hibernate user forum:

	https://forum.hibernate.org/viewtopic.php?f=1&t=964043

Regards,

Giampaolo



More information about the amavis-users mailing list