I have a relation  [1:n] from table A to table B.

define_table('A',
 Field('name', type='string'))

define_table('B',
 Field('ref_a', type='reference A'))



Then I have this grid

qry = db.A.id>0
grid = SQLFORM.grid(qry,links=links)

How do I write links (and the lambda function in it) in order to have in 
the grid an additional column with the count of references to A 
(db.B.ref_a.count()) ?

-- 



Reply via email to