Giter Club home page Giter Club logo

Comments (5)

truesteps avatar truesteps commented on May 28, 2024

Okay I found the issue was with the default configuration. I'm going to keep this bug open since it's terribly documented. In order for the module to work as suggested in the documentation from scratch, the dbTransactionEnabled config option should be false by default, not true.

What would be the ideal solution in this case, updating the documentation and mentioning the dbTransactionEnabled option, or just changing it's default behaviour?

from balance.

klimov-paul avatar klimov-paul commented on May 28, 2024

Unable to reproduce both with unit tests and with manual test at live project.
Unit test for BalanceDb is run with default config: dbTransactionEnabled equals true and dbTransactionNestedEnabled equals false - without any issue. See:
https://github.com/illuminatech/balance/blob/1.3.0/tests/BalanceDbTest.php

If you experience the problem, then open a PR with failiing unit test, which reproduces it.

Transaction related options are documented properly:
https://github.com/illuminatech/balance/blob/1.3.0/src/BalanceDbTransaction.php#L24-L36

However, there is always room for the improvement. If you have a suggestion about how the docs could enhanced - open a separated PR, so I can consider it.

from balance.

klimov-paul avatar klimov-paul commented on May 28, 2024

Most likely you are executing Balance::increase() within open DB transaction, which is then not committed explicitly or rollbacked at some point.

from balance.

truesteps avatar truesteps commented on May 28, 2024

@klimov-paul the issue persists, as long as I have dbTransactionEnabled turned on, whenever I want to create a transaction, it never gets written, if it gets called outside of a transaction. Is that expected behaviour?

from balance.

klimov-paul avatar klimov-paul commented on May 28, 2024

If you are able to reproduce the issue - write down the unit test, which illustrates it.

from balance.

Related Issues (7)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.