Issue #3382857 by ciprian.stavovei: Getting LogicException: The database connection is not serializable