Comments (8)
hi @fiLLLip , can you show the ReQL you're using? before and after the .update()
from rethinkdb.driver.
I'm not at my work computer (where I'm testing this out), but I'm pretty sure it goes like:
// _table = _r.db(_c.Dbname).table(TableName);
_table.get(id).update(updatedObject).run(_connection);
from rethinkdb.driver.
Hi @fiLLLip , I can't reproduce the behavior you're seeing...
The following passes the unit test on my dev box:
I need a bit more info on this one.
from rethinkdb.driver.
So, I got the logging up and running 👍
Here is the object I'm trying to push to the server:
I have now changed the ReQL to:
// _table = _r.db(_c.Dbname).table(TableName);
_table.update(obj).run(_c.Connection);
And the server returns this (I'm fetching the object before updating it):
2015-11-19 11:16:19 [Information] Executing action method "DemoProject.Api.Controllers.FilesController.UploadFile" with arguments (["Microsoft.AspNet.Http.Features.Internal.FormFile", "269571e7-f4c2-4318-b639-bbfd343fa0c7"]) - ModelState is Valid'
2015-11-19 11:16:19 [Verbose] JSON Send: Token: 1, JSON: [1,[16,[[15,[[14,["test"]],"file"]],"269571e7-f4c2-4318-b639-bbfd343fa0c7"]],{}]
2015-11-19 11:16:19 [Verbose] JSON Recv: {"t":1,"r":[{"Description":"Demo asdfasfadsfafile","Name":"testFile","Permissions":[{"Owner":true,"Read":true,"UserId":"5cd708c8-c8b3-4108-8470-547dbd03ef70","Write":true}],"TenantId":"default","Versions":null,"id":"269571e7-f4c2-4318-b639-bbfd343fa0c7"}],"n":[]}
2015-11-19 11:16:19 [Verbose] JSON Send: Token: 1, JSON: [1,[53,[[15,[[14,["test"]],"file"]],{"Name":"testFile","Description":"Demo asdfasfadsfafile","Versions":[2,[{"Version":1,"Bytes":{"$reql_type$":"BINARY","data":{"$reql_type$":"BINARY","data":"PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iVVRGLTgiIHN0YW5kYWxvbmU9Im5vIj8+DQo8U2hpcG1lbnQ+DQoJPFNoaXBtZW50TnI+NTEwNzA8L1NoaXBtZW50TnI+DQoJPFNoaXBtZW50RGF0ZT4yMDE1LTEwLTAyPC9TaGlw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kZXJRdHk+MTwvT3JkZXJRdHk+DQoJCQk8U2hpcFF0eT4xPC9TaGlwUXR5Pg0KCQk8L1NoaXBtZW50TGluZT4NCgkJPFNoaXBtZW50TGluZT4NCgkJCTxJdGVtTnI+MTA0NzwvSXRlbU5yPg0KCQkJPEl0ZW1OYW1lPlRhY28ga2rDuHR0ZGVpZyAgMiBrZzwvSXRlbU5hbWU+DQoJCQk8SXRlbU5hbWUyLz4NCgkJCTxPcmRlclVuaXQ+c3RrPC9PcmRlclVuaXQ+DQoJCQk8T3JkZXJRdHk+NTwvT3JkZXJRdHk+DQoJCQk8U2hpcFF0eT41PC9TaGlwUXR5Pg0KCQk8L1NoaXBtZW50TGluZT4NCgk8L1NoaXBtZW50TGluZXM+DQo8L1NoaXBtZW50Pg=="},"MimeType":"text/xml","Created":[99,["2015-11-19T10:16:19.6303139+00:00"]],"UploadedByUserId":"aa93ca25-8672-4545-a927-90b9b1249f4c"}]],"Permissions":[2,[{"Read":true,"Write":true,"Owner":true,"UserId":"5cd708c8-c8b3-4108-8470-547dbd03ef70"}]],"TenantId":"default","id":"269571e7-f4c2-4318-b639-bbfd343fa0c7"}]],{}]
2015-11-19 11:16:19 [Verbose] JSON Recv: {"t":1,"r":[{"deleted":0,"errors":1,"first_error":"Expected type STRING but found PTYPE<BINARY>.","inserted":0,"replaced":0,"skipped":0,"unchanged":0}],"n":[]}
I see that the previous schema I posted here did not contain the byte[]
field, and I'm sorry I didn't post it 😞
The Bytes
field is of type byte[]
:
public byte[] Bytes { get; set; }
The weird thing is that I didn't get an exception, even though the returned JSON states 1 error.
from rethinkdb.driver.
Hi @fiLLLip , this should be fixed in 7 alpha 5. As for the driver silently failing: I'm not sure why, but the RethinkDB server is sending us SUCCESS_ATOM
Recv: {"t":1
, so technically, with respect to the protocol, the response is not an error to be thrown. Ultimately, we had a malformed pesudo
binary object.
from rethinkdb.driver.
Maybe it's because I was using RethinkDb 2.1.5. I have now updated to 2.2.1.
I will test the new driver version soon 👍
from rethinkdb.driver.
The new driver version works like a charm! Great work, as always 👍 😄
from rethinkdb.driver.
Dont forget to check out the new docs :) I added a whole bunch of cool new stuff including Reactive Extensions support and additional run helpers like runResult().EnsureSuccess()
https://github.com/bchavez/RethinkDb.Driver/wiki/Extra-C%23-Driver-Features
from rethinkdb.driver.
Related Issues (20)
- Create a method to return result as raw json HOT 4
- Resolution function on OptArg insert conflict HOT 1
- ConnectionPool.Builder.ConnectAsync does not respect InitialTimeout() HOT 4
- Add Error codes to Exceptions HOT 2
- Additional exceptions thrown when trying to cancel Cursor.MoveNextAsync() HOT 6
- Object's primary key and key of RunAtom() is different (Client-side generation). HOT 4
- Support for System.Text.Json.JsonDocument
- Cursor<T> should implement IAsyncEnumerable<T> in .net core 3
- RethinkDB 2.4 Release
- Best options: RunResult, RunAtom or RunCursor HOT 3
- Get list from Table that contains 'A' in the 'message' field HOT 1
- ASL 2.0 HOT 1
- Implement lambda functions as a possible argument in Insert().OptArgs("conflict",...) HOT 1
- System.NullReferenceException HOT 1
- Add EntityFramework support to Linq provider HOT 5
- Polymorphism HOT 1
- Various exceptions when updating a document HOT 1
- System.Configuration.ConfigurationErrorsException: HOT 1
- Wrong OptArg serialisation after OrderBy
- Insert not working with RunNoReply & Can't use runOpts is always null -- solved
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from rethinkdb.driver.