Accessing object IDs using the .id notation will not work if a model has
a custom primary key. It is safer to use the .pk notation.