Improved datasources

Made cursorTo<Object> methods in datasources more robust to database
refactoring.