Closed honghaoz closed 7 months ago
I think this issue should be moved to https://github.com/vapor/fluent
Experiencing the same issue on saving existing model and mongodb-provider.
~Looks like after the save call the mongo-driver is returning an array of objects instead of the single object that was saved.~
Misread it, it looks like the object being saved just needs to be wrapped in an array first before being returned.
We should fix this in https://github.com/vapor/mongo-driver/pull/26.
@tannernelson don't you mean it the other way around? It's returning one object instead of an array
@Joannis updated my comment.
Closing as this library is ancient
I'm using mongo as my database provider.
When I modify a model and
save()
it,Unsupported Node type, only array is supported.
is logged into the console. But this model can save successfully anyway.Following is my code:
main.swift
UserController.swift
User.swift