my_model:save(my_model:new_with([{name,"1"}])).
But if I try to save the same model inside of a transaction, like this:
my_model:transaction(fun() ->
my_model:save(my_model:new_with([{name,"1"}]))
end).
I get the SQL error:
{atomic,{ok,{sql_error,"25P02",
"Rexec_simple_query L928 Fpostgres.c Mcurrent
transaction is aborted, commands ignored until end of transaction
block"}}}
At least the error is atomic!
1. Why doesn't the process die, rather than returning "OK"?
2. Why can't I do this inside of a transaction?
3. Is anybody actually running against psql? Has anybody tested this
driver?
Yariv
The unit tests don't cover *running a transaction*?
Apparently not :)
I should have been adding more test cases as I've been more features
to ErlyDB since I first wrote the tests a long time ago,
Yariv