arangox_ecto icon indicating copy to clipboard operation
arangox_ecto copied to clipboard

Unique constraint violation: bad return value

Open StevenG74 opened this issue 1 year ago • 2 comments
trafficstars

ArangoXEcto version

1.3.1

Elixir and OTP version

1.15.7 - OTP 26

Ecto version

3.11.1

ArangoDB version

3.10.10

Steps to Reproduce

  1. create persistent index on two fields (:name, :surname)
  2. try to submit a form with name and surname fields already existing

Expected Behavior

changeset error should be returned

Observed Behavior

Exception raised: [error] GenServer #PID<0.3183.0> terminating ** (stop) bad return value: "ArangoXEcto does not support rollbacks at this time"

Additional Context

No response

StevenG74 avatar Feb 29 '24 12:02 StevenG74

Hi @StevenG74, sorry it took a while to see this. Are you able to provide an example of your code?

As a side note, rollbacks will be supported in the next version.

TomGrozev avatar Mar 14 '24 19:03 TomGrozev

Hi @TomGrozev, sorry for the delayed answer, I managed to write a simple app to reproduce the issue, and the problem seems to be solved, even in my original (production) app.

The demo app is this one: https://github.com/StevenG74/arangodb_test

Thanks anyway for your support, and for the great job you are doing with this library. Steven

StevenG74 avatar Apr 19 '24 10:04 StevenG74