GithubHelp home page GithubHelp logo

Comments (5)

soitgoes avatar soitgoes commented on May 20, 2024

I'm virtually certain that it's due to one of the validation rules that is
in place on the _users db. If I were you I would try and make the same
change in futon and see what it says. My bet is that it complains about
something.

Technically I would've thought that would've produced an different http
error code than 200 so there my be something I need to look into but let me
know please if that is the problem.

If it works when you try it in Futon then please try it on a tmp database
so that we can eliminate the database as the problem.

Hope this helps.

Thanks

-Martin

On Sun, Oct 7, 2012 at 4:47 PM, Joe Donley [email protected] wrote:

For some reason I cannot get an update to take on the users table in
couch. Here's some code

CouchClient _client = CouchClientProvider.GetClient();
CouchDatabase _db = _client.GetDatabase("_users");
_db.SetDefaultDesignDoc("test_users");

Document doc = new Document(
new CouchUserDocument()
{
name = user.Email,
user_name = user.Name,
testing_password = user.Password,
datecreated = user.DateCreated,
datemodified = user.DateModified,
roles = user.Roles.Select(x => x.Name).ToList(),
user_type = "testing",
type = "user"
});
doc.Id = "org.couchdb.user:" + user.Email;
_db.SaveDocument(doc);

var result = _db.GetDocument(doc.Id);

I'm getting the doc back, but nothing is updating. I'm specifically trying
to update the 'roles' property.
Any thoughts?


Reply to this email directly or view it on GitHubhttps://github.com//issues/40.

Martin Murphy
Whiteboard-IT
http://whiteboard-it.com
(205) 910-0720

from loveseat.

jwdonley avatar jwdonley commented on May 20, 2024

Got the update to work just fine in Futon. I'm going to try it on another db right quick.

from loveseat.

jwdonley avatar jwdonley commented on May 20, 2024

Taking the same steps but for a different database gives me the same results.

from loveseat.

soitgoes avatar soitgoes commented on May 20, 2024

Nothing is wrong with the code that I can see but if the id is already
existing you must submit it with a rev.
On Oct 7, 2012 5:10 PM, "Joe Donley" [email protected] wrote:

Taking the same steps but for a different database gives me the same
results.


Reply to this email directly or view it on GitHubhttps://github.com//issues/40#issuecomment-9213096.

from loveseat.

jwdonley avatar jwdonley commented on May 20, 2024

Ah, that's probably it than. Thanks!

from loveseat.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.