Fixed an issue with copy template, was not copying the right stuff. Fixed an issue with get_by_id template, did not check return from from_result. Use db_value_t as primary key / id in all database objects and tests.