Incorrect assumption that Pk is always called "id". Changed to a more generic method that pulls the actual Pk name

This class is used for lookup tables mostly and as such it works fine, consider adding a check for composite Pk

Signed-off-by: Marcin Wiatr <mail.wichura@gmail.com>