Why do the database functions return all fields as strings?
The DatabaseStatementBase::fetchObject() method is inherited from PHP's PDOStatement::fetchObject() which returns the object columns as strings. Given that not all RDBMS's have the same set of types &amp; PHP isn't a strongly typed language, it was probably decided to return everything as strings since it's a base datatype that can be relied on.