QueryException in Hibernate because of apostrophe
问题 Here its my Query SQL_QUERY="SELECT review.comment FROM ReviewDO review WHERE title='"+titleName+"'"; By using title am trying to get its description. For Example if tileName="Worth for money"; (without apostrophe) the query will be: SQL_QUERY="SELECT review.comment FROM ReviewDO review WHERE title='Worth for money'; am getting the output. but if titleName="Can't beat the product"; (with apostrophe) SQL_QUERY="SELECT review.comment FROM ReviewDO review WHERE title='Can't beat the product'; am