Comments (7)
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.
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.
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.
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.
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.
@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.
When do you plan to support generic types?
from arangoclient.net.
Related Issues (20)
- ArangoServerException not throw when db unavailable HOT 2
- Thread safety HOT 7
- Confused with SystemDatabaseCredential HOT 5
- Custom Index HOT 6
- ByExampleAsync missing HOT 2
- Make ChangeCollectionPropertyForType public HOT 1
- Using LINQ query with Where performance HOT 1
- ArangoServerException eats up all the useful information like status code and error number HOT 2
- Make collection name resolver more extensible HOT 2
- Annotating a property of type Guid as DocumentProperty.Key throws InvalidCastException HOT 2
- Support private setter
- CreateStatement<object> & Remove Vertex HOT 1
- Ternary operator support
- Global error handling policy
- Support for keyOptions: uuid
- Edge Document API not supported?
- Cannot Simply Connect to Server...... HOT 2
- Secure connection to ArangoDB
- Query directly within a collection
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 arangoclient.net.