fixed bug in mysql fetch in databasemodel
added support for databasemodel