How to replace the deprecated createQuery method

Hey, Session interface method createQuery​(String queryString) deprecated. Why is it deprecated? Is there a similar method with string for delete operations

Session.createQuery(String, Class) is more typesafe and should be preferred, or alternatively use the new createSelectionQuery and createMutationQuery methods.