Fedox-die-Ente / gmsv_mongo

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.
GNU Affero General Public License v3.0
12 stars 1 forks source link

Cannot insert an array of tables #6

Closed moriokii closed 1 week ago

moriokii commented 1 week ago

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

image

Austria7 commented 1 week ago

Fixed with Release 1.3.