Open makii42 opened 7 years ago
hi @makii42, thanks. Let me check it.
Hi @diegogub ,
I looked into the test failure yesterday for a while, and it seems there is no arangodb running as part of the test. I prepped a wercker.yml locally that's working, and added some code to config_test.go
that uses a db at localhost
and flips over to one provided in a service container if it's running in wercker. I'll add it to the PR in a bit.
Unfortunately, one test still fails in simple.test.go
when using Cursor.FetchOne()
. This seems unrelated to my change though.
Best, -Ralf
Okay, that's weird - I just set up a wercker build on my fork, and it gets as far as I get when I use the wercker client locally...
Hi,
I was trying to enforce uniqueness on a
int32
field in a model struct using models/context, and it just did not work, without a proper error message. While looking at the mechanism enforcing uniqueness I discovered the example query that is executed in collection.go:Unique This function gets passed theString()
ed version of thereflect.Value
, rather than the underlying value of the field. That might work for strings, but apparently does not forint
fields. I found two instances where this happens:Instead of passing the result of
Value.String()
I propose to passValue.Interface()
to make this work for non-string fields as well.