Test creating a model with a pk relation