Fixed bugs and added is.factor

* Fixed bug: db.existObject does not work with view

* Fixed bug: delete returns TRUE even when deletion fails

* Added cascade option in delete

* Added is.factor