Read primary_key from model definition