Added a pk property to the classes which defaults to id unless specified