For some reason getId() returns -1, as the select inside doesn't return any results for some mysterious reason.