Skip to content

Commit

Permalink
Merge pull request #125 from Jacyking/master
Browse files Browse the repository at this point in the history
`filed` to avoid the field conflict with mysql keyword
  • Loading branch information
Jacyking authored Nov 2, 2023
2 parents 54565a5 + 7aaf513 commit 57990f1
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion include/utility.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -150,7 +150,11 @@ inline std::string get_fields() {
return alisa_fields;
}
for (const auto &it : iguana::Reflect_members<T>::arr()) {
#ifdef ORMPP_ENABLE_MYSQL
alisa_fields += "`" + std::string(it.data()) + "`";
#else
alisa_fields += it.data();
#endif
alisa_fields += ",";
}
alisa_fields.back() = ' ';
Expand Down Expand Up @@ -333,4 +337,4 @@ constexpr std::string_view get_field_name(std::string_view full_name) {
get_field_name<decltype(&field)>(std::string_view(#field)).data()
} // namespace ormpp

#endif // ORM_UTILITY_HPP
#endif // ORM_UTILITY_HPP

0 comments on commit 57990f1

Please sign in to comment.