added findById method for external databases (T-6655)