getLastId method on Base Class