References the kind of key by the python attribute, not the db field name.

Signed-off-by: Tyler O'Meara <Tyler@TylerOMeara.com>