The gmsv_mongo module enables the usage of MongoDB connections within Garry's Mod (GMod) via Rust. This opens up diverse possibilities for database interactions and management within GMod servers.
Cannot insert an array of tables into collection. Also, when marshaling table with JSON, it returns expected result.
Code to reproduce:
function Test(coll)
local document = {
steam_id = "some",
slots = {
{ hello = "test" },
{ hello = "test2" },
}
}
print("JSON: "..util.TableToJSON(document))
local res = coll:Insert(document)
if res ~= true then
print("Cannot save document")
return
end
print("Document saved")
end
Cannot insert an array of tables into collection. Also, when marshaling table with JSON, it returns expected result.
Code to reproduce: