Also load primary key from databases. Fixes #114