add getMaxId method on DbTable