[odb-users] Update and persist all objects of a query result

MM finjulhich at gmail.com
Sat Jul 6 11:16:03 EDT 2024


Hello,
The result iterator being a input iterator, I suspect this loop is
incorrect:


odb::result<myobject> result = db.query<myobject>(....);
for( auto& obj: result ) {
   obj.myfield = "";
   db.update(obj);
}

Am I right?
I think the above SEGV

What is the correct way of storing empty strings for a group of objects?


More information about the odb-users mailing list