Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

DB - fails to initialize existing collections - end up with duplicate error #33

Open
prasad83 opened this issue Aug 10, 2016 · 1 comment

Comments

@prasad83
Copy link

db.ColExist("colname") returns false on each run - but attempt to create leads to error and blocks.

Session.DB -> intends to loadCollection into Database through the call Collections(&db) which is defined in collections.go

    res, err = db.get("collection?excludeSystem=true", "", "GET", nil, db, db)

This call works well but db does not get initialized with expected Collections due to missing tag for json decoding.

The fix below worked.

type Database struct {
    Name        string `json:"name"`
    Id          string `json:"id"`
    Path        string `json:"path"`
    System      bool   `json:"isSystem"`
    Collections []Collection `json:"result"` // FIX
    sess        *Session
    baseURL     string
}
@diegogub
Copy link
Owner

hello @prasad83 , which arangodb version are you using and aranGO branch?
Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants