-
Notifications
You must be signed in to change notification settings - Fork 0
Save or update
Eduardo William Karpinski Priester edited this page Oct 1, 2021
·
6 revisions
public static void main(String[] args) {
// creating a record
MyEntity entity1 = new MyEntity();
entity1.setText("HCF is best");
new HCFConnection<>(MyEntity.class).save(entity1);
// updating the registry
MyEntity entity2 = new MyEntity();
entity2.setId(1L); // update entity when primary key is populated
entity2.setText("HCF is best");
new HCFConnection<>(MyEntity.class).save(entity2);
}