def _image_child_entry_delete_all(child_model_cls, image_id, delete_time=None, session=None):
 session = (session or get_session())
 query = session.query(child_model_cls).filter_by(image_id=image_id).filter_by(deleted=False)
 delete_time = (delete_time or timeutils.utcnow())
 count = query.update({'deleted': True, 'deleted_at': delete_time})
 return count

def _image_child_entry_delete_all ( child_model_cls , image_id , delete_time = None , session = None ) : session = ( session or get_session ( ) ) query = session . query ( child_model_cls ) . filter_by ( image_id = image_id ) . filter_by ( deleted = False ) delete_time = ( delete_time or timeutils . utcnow ( ) ) count = query . update ( { 'deleted' : True , 'deleted_at' : delete_time } ) return count
deletes all the child entries for the given image id .