[f for f in db.B.fields if db.B[f].type == 'reference A'][0]

Anthony

On Wednesday, January 11, 2012 8:54:08 AM UTC-5, monotasker wrote:
>
> I have a function in which I have two table names 'db.A' and 'db.B'. There 
> is a field in db.A that links to the id field of db.B. But I don't know 
> what that linking field is called in db.A. Is there a way to find this out 
> programmatically?
>
> (This is the last nut to crack before I can release the second version of 
> my ajaxselect plugin, adding the ability to filter one select based on the 
> value of another.)
>

Reply via email to