Created
March 18, 2015 03:50
-
-
Save xilin/48f71113519b899781c4 to your computer and use it in GitHub Desktop.
Hibernate Update
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
StringBuffer sql = new StringBuffer(); | |
sql.append("UPDATE TABLE_NAME "); | |
sql.append("SET FIELD_NAME = FIELD_VALUE "); | |
sql.append("WHERE COND_FIELD =:param "); | |
SQLQuery query = this.getSession().createSQLQuery(sql.toString()); | |
query.setParameter("param", paramValue); | |
query.executeUpdate(); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment