Skip to content

Instantly share code, notes, and snippets.

@gistlyn
Last active July 28, 2016 07:35
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save gistlyn/849680f095fb2721b2714d0bbcddc8d7 to your computer and use it in GitHub Desktop.
Save gistlyn/849680f095fb2721b2714d0bbcddc8d7 to your computer and use it in GitHub Desktop.
OrmLite UPDATE Examples

UPDATE Examples

In its most simple form, updating a model on its own without any filter conditions will update every field, except the Id which is used to limit the update to itself. Otherwise you can specify a custom filter condition using a typed expression:

UpdateOnly

As updating a partial set of fields is a common use-case, OrmLite provides several UpdateOnly() APIs for this purpose:

UpdateAdd

When you need to update existing values you can use UpdateAdd() Typed APIs:


Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment