Allow _primary_val to be defined for each model (default is 'name')

Fixes #223