Roberto Saccon created this driver, so he should have the most
authoritative opinion on this issue. I haven't tested it but the unit
tests have passed according to other people. Unfortunately, it looks
like the unit tests haven't covered this case. You can try fixing it
(you can see how the MySQL driver handles transactions) or... switch
to MySQL :)

Yariv

On Dec 3, 2007 7:42 PM, David King <[EMAIL PROTECTED]> wrote:
>
> Using psql, I can create save an instance of a model like this:
>
> 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?
>
> >
>

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"erlyweb" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/erlyweb?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to