as I understand this, the DAL always uses the id field for referencing in a one to many relationship. And: you don't link to a certain field (EmailID) but to a record of your emails table.
see http://web2py.com/book/default/chapter/06#Legacy-Databases-and-Keyed-Tables On Aug 8, 8:00 am, Phyo Arkar <phyo.arkarl...@gmail.com> wrote: > I am Thinking to link two tables , > "emails" and "attachments" > > emails have a unique key , EmailID , which is a md5sum of the path to email > file > > I am trying to link with another table which is attachment table , it will > have a field 'attachment_of' which is link to "EmailID" > > To Short > > How can i link between primary and foreign keys which is a > non-id_but_unique field?