I have the following database table object:
public class Goal {
@DatabaseField(generatedId = true)
private int id;
@DatabaseField
private String goal_title;
@DatabaseField
private String goal_desc;
@DatabaseField
private String goal_why;
...
}
I have added some rows to this table and now I want to write a query to update all the columns of a row in this table. I have seen documentation of ORM and could not get an idea how to write this query. Please help me how to write this query.
I think you need to RTFM. I’ve spent a long time on the ORMLite documentation and I think it covers the
UpdateBuilderpretty well. Feel free to ask more specific questions and I can add more details if not.To quote from the docs:
To tweak the example code to use your
Goalobject:Hope this helps.