You need to first delete all the child records of the blog and then an only then you can remove blog. e.g. if comment of blogs exists then you need to first remove comment and then you can remove blogs. you can remove all child records by calling $blogs->comment->RemoveAll().