Skip to content

Instantly share code, notes, and snippets.

@edgarMejia
Forked from Hazem-Ben-Khalfallah/UpdateQuery.java
Created December 12, 2018 22:35
Show Gist options
  • Save edgarMejia/1ea43d10e31a43f31db99b31dc40b041 to your computer and use it in GitHub Desktop.
Save edgarMejia/1ea43d10e31a43f31db99b31dc40b041 to your computer and use it in GitHub Desktop.
[Ebean raw update query] Execute raw sql update #sql #ebean
public static final String SQL_UPDATE = "update person set usr_name = :name ";
final Update update = Ebean.createUpdate(Person.class, SQL_UPDATE);
update.setParameter("name", "new name");
final int updatedRows = update.execute();
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment