Open zeadhani opened 3 weeks ago
What specific ash, ash_postgres and ash_sql versions are you using?
Also ash_money
Please make sure you're on the latest of all of them.
I am using the following versions, all of which are updated:
• ash_postgres: ~> 2.4.12
• ash_sql: ~> 0.2.38
• ash_double_entry: ~> 1.0.6
• ash_money: ~> 0.1.13
• ex_money_sql: ~> 1.11
I've made a small change in main
that may help, but if not I will have to look into this next week. Please try it out and let me know.
Thank you for the quick response and update! I tried the change, but now I’m getting the following error:
** (Postgrex.Error) ERROR 42725 (ambiguous_function) operator is not unique: + unknown
Please let me know when it’s fixed or if there’s an issue on my end that I should address. Appreciate your help!
🤔 something is definitely strange there. I'm not seeing the same error in my own application. Can you please create a reproduction? Have you applied the relevant ash_money
migrations? I think there may be a set up issue somewhere along those lines.
I’ll double-check those migrations tomorrow morning and provide a quick update. 🙇♂️
I actually found something that I think may be the cause. It requires a fix both in Ash
and AshMoney
. I will push the fix up to main
of both and you can try it :)
It fixes a different issue that I noticed, but seems "adjacent" to this one :)
Please give those packages (in main
) a try and LMK. If not, a reproduction will be necessary.
Thanks for looking into this! I pulled all the packages from the main and re-ran all the migrations from scratch, but the error still exists.
Okay, please provide a small reproduction project so I can diagnose further
Will do
Issue Summary
When creating a transfer after upgrading from version 0.2.4 to 1.0.6, an error occurs during the operation. The PostgreSQL error ambiguous_function appears, indicating that an operator is not unique, with the hint suggesting the need for explicit type casts.
Steps to Reproduce
[debug] QUERY ERROR source="balances" db=0.0ms UPDATE "balances" AS b0 SET "balance" = (CASE ... ) WHERE ... ** (Postgrex.Error) operator is not unique: - unknown Hint: Could not choose a best candidate operator. You might need to add explicit type casts.
Observed Behavior
The transfer creation fails with an ambiguous_function error in PostgreSQL.
Expected Behavior
The transfer should be created without any errors, and the balances table should update correctly.
Additional Details
Troubleshooting Done