ApiLogicServer / ApiLogicServer-src

Create an executable project (API and Admin App) from a database or natural language prompt with 1 command, customize with declarative rules and Python in your IDE, containerize and deploy.
https://apilogicserver.github.io/Docs/
BSD 3-Clause "New" or "Revised" License
28 stars 4 forks source link

Cannot disable optimistic locking #35

Closed shannonmccleary-ihm closed 8 months ago

shannonmccleary-ihm commented 8 months ago

For some reason, I cannot get past a Sorry, row altered by another user - please note changes, cancel and retry error on PATCH requests after following the instructions to disable optimistic logging. The different steps I followed are below:

Any pointer would be appreciated. I also see that after disabling optimistic logging via the env param, that its still trying to compare checksums before throwing the error

Logic Phase:        ROW LOGIC       (session=0x14a63fe9b40) (sqlalchemy before_flush)           
..Transaction[999] {Update - client} amount:  [None-->] 0, total_debits:  [None-->] 0, total_credits:  [None-->] 0, transaction_id: 999, customer_id: 1, account_id: 101, transaction_type: TRANSFER, status: COMPLETED, memo: Transfer 55656 45 4353453453, overdraft_amount: 0, date_created: 2024-01-05 08:00:00, image: None  row: 0x14a63febca0  session: 0x14a63fe9b40  ins_upd_dlt: upd
optimistic lock failure - as-read vs current: -2591216826283511313 vs -1746028868916537688
valhuber commented 8 months ago

Hi!

Sorry it's not running, thanks for reporting.

Is there anyway you can provide the database?

Thanks, Val

shannonmccleary-ihm commented 8 months ago

Sure, its just a sample db. I'm working with MySQL Workbench as here is the database dump mysql-dumps.zip

valhuber commented 8 months ago

Great, got it.

I'll look into this and get back to you.

valhuber commented 8 months ago

I have published a fix: https://github.com/ApiLogicServer/ApiLogicServer-src/releases/tag/10.01.12

Alert: as sometimes seems to happen, my PyCharm started to fail creating venv's. I had just update to a new release, so that's possibly related. This has been tested under VSCode.

Please join our slack channel.

shannonmccleary-ihm commented 8 months ago

I have published a fix: https://github.com/ApiLogicServer/ApiLogicServer-src/releases/tag/10.01.12

Alert: as sometimes seems to happen, my PyCharm started to fail creating venv's. I had just update to a new release, so that's possibly related. This has been tested under VSCode.

Please join our slack channel.

works great now, thank you!

valhuber commented 8 months ago

Excellent!

I do need to understand a bit more of why the opt lock failed. Can we connect, either through slack link or email (valjhuber@gmail.com)?

Slack channel.