Furthermore, calling AbstractPreparator::prepare() with Poco::Data::Keywords::null will actually call the prepare() overload for int, resulting in an exception later on when actually fetching the value and the value cannot be converted to an int.
Solution: call AbstractPreparator::prepare() with T() instead.