Git Product home page Git Product logo

Comments (7)

isen-ng avatar isen-ng commented on September 22, 2024

This happens on insert as well:

Code:

var wrapped = Wrapper.Wrap(key, state);
var result = await db.InsertAsync<Wrapper<TState>>(wrapped)

Exception:

ArangoDB.Client.ArangoServerException: collection or view not found: Wrapper`1. ErrorNumber: 1203 HttpStatusCode: 404
   at ArangoDB.Client.BaseResultAnalyzer.ThrowIfNeeded(BaseResult baseResult)
   at ArangoDB.Client.Http.HttpCommand.RequestMergedResult[T](Object data)
   at ArangoDB.Client.Collection.ArangoCollection.InsertAsync(Object document, Nullable`1 waitForSync, Action`1 baseResult)
   at ArangoDB.Client.Collection.ArangoCollection`1.InsertAsync(Object document, Nullable`1 waitForSync, Action`1 baseResult)
   at ArangoDB.Client.ArangoDatabase.InsertAsync[T](Object document, Nullable`1 waitForSync, Action`1 baseResult)
   ...

from arangoclient.net.

isen-ng avatar isen-ng commented on September 22, 2024

In fact, running the simplest of insertion script throws collection not found:

var result = db.Insert<State>(new State());

throws

ArangoDB.Client.ArangoServerException: collection or view not found: State. ErrorNumber: 1203 HttpStatusCode: 404
   at ArangoDB.Client.BaseResultAnalyzer.ThrowIfNeeded(BaseResult baseResult)
   at ArangoDB.Client.Http.HttpCommand.RequestMergedResult[T](Object data)
   at ArangoDB.Client.Collection.ArangoCollection.InsertAsync(Object document, Nullable`1 waitForSync, Action`1 baseResult)
   at ArangoDB.Client.Collection.ArangoCollection`1.InsertAsync(Object document, Nullable`1 waitForSync, Action`1 baseResult)
   at ArangoDB.Client.ArangoDatabase.InsertAsync[T](Object document, Nullable`1 waitForSync, Action`1 baseResult)
   ...

from arangoclient.net.

isen-ng avatar isen-ng commented on September 22, 2024

Basically, I cannot get your example code on your website to run:

    // insert new document and creates 'Person' collection on the fly
    db.Insert<Person>(person);

this doesn't seem to be true.

from arangoclient.net.

isen-ng avatar isen-ng commented on September 22, 2024

It seems like auto create collection was dropped in ArangoDb 3.0, which means your documentation is still based on the old version.

If that's the case, then there needs to be a db.CreateCollection<T> to create a the collection based on the type. This is important because all of your other APIs depend on using the type to identify the collection.

from arangoclient.net.

isen-ng avatar isen-ng commented on September 22, 2024

It seems like your collection name resolution is also causing problems with generics.
type.Name will return things like Wrapped`1.

If you'd prefer, I will be able to send PRs for these issues.

from arangoclient.net.

ra0o0f avatar ra0o0f commented on September 22, 2024

@isen-ng sorry for late response, unfortunately name resolving for generic types are not handled, this should be fixed in next versions

from arangoclient.net.

endeffects avatar endeffects commented on September 22, 2024

When do you plan to support generic types?

from arangoclient.net.

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.