Closed alolis closed 8 years ago
Can you provide a standalone working example that exhibit the bug? Thank you :)
@nviennot , It seems that I will answer my own question. The reason that generated_keys
is missing is because I append custom IDs to those documents. I tested without appending custom IDs and it is working fine.
Model.insert_all
however, will return the generated_keys
field, which in my case does not exist and as a result is hard for me to implement error handling. In my case the inserted
field is more appropriate. Is there a way to get the whole result
or insert_all
must be changed first?
You might want to use raw RQL. You may do something like this:
results = NoBrainer.run { Model.rql_table.insert(documents) }
@nviennot , cheers, i will give it a go
@nvedul2 , it's not polite to try to hijack another persons thread.
Hello,
I am using latest version of nobrainer gem with RethinkDB 2.1.4 and suddenly when I execute model.insert_all I do not get the returned keys that were generated. I debugged nobrainer a little bit and it seems that the problem is here:
result
hash does not have agenerated_keys
key; it only containsdeleted
,errors
,inserted
,replaced
,skipped
andunchanged
Any ideas where the
generated_keys
field went?