User a = new User(db);
a.id = 30; a.name = "hello"; a.commitChanges(); // tries an update or insert on the my_table table
Unlike the base DataObject class, this template provides compile time checking for types and names, based on the struct you pass in:
a.id = "aa"; // compile error
a.notAField; // compile error
This creates an editable data object out of a simple struct.
struct MyFields { int id; string name; }
alias SimpleDataObject!("my_table", MyFields) User;