Forum Stats

  • 3,851,937 Users
  • 2,264,053 Discussions
  • 7,904,910 Comments

Discussions

The column value becomes null when calling getDBTransaction().commit();

User_7O0WQ
User_7O0WQ Member Posts: 6 Green Ribbon
edited Aug 8, 2022 10:11AM in JDeveloper and ADF

Hi,

The Jdeveloper version: 12.2.1.2

There is a scenario where in there are two fields for Tax values and there is vendor field. When users enters the value in both the tax fields and the addition of it comes to xx.00 or xx.10 or xx.50, the vendor column value becomes null in the DB after commit call. This issue occurs intermittently. Getting no clue what could be the cause. Any help? Pls mention for more info.

Tagged:

Answers

  • Timo Hahn
    Timo Hahn Senior Principal Technical Consultant - Oracle ACE Director Member, Moderator Posts: 38,727 Red Diamond

    How are the two tax values combined?

    Addition of what? Where? How?

    Any DB triggers for the columns?


    Timo

  • User_7O0WQ
    User_7O0WQ Member Posts: 6 Green Ribbon

    ->How are the two tax values combined?

    Bother values are added and addition populates in totaltax column

    ->Addition of what? Where? How?

    Addition of two tax fields values on screen and sets the addition in VO attribute which is based on EO

    ->Any DB triggers for the columns?

    None

  • Timo Hahn
    Timo Hahn Senior Principal Technical Consultant - Oracle ACE Director Member, Moderator Posts: 38,727 Red Diamond

    Then there is an error in this implementation.

    Can you provide a reproducible test case built in the HR DB schema?


    Timo

  • User_7O0WQ
    User_7O0WQ Member Posts: 6 Green Ribbon
    edited Aug 10, 2022 2:06PM

    I will try to put it this way upon further analysis -> There is a scenario where the VO is based on EO. After setting all the values code is calling getDBTransaction().commit(); Then there is some code executes to check some validation. Post which basis on the validation, there is one getDBTransaction().commit(); gets executed and after this second commit(); the value on one DB column gets set to "null". we have checked the DB triggers, EO validation and also the but did not find anything that could be cause of this issue.. Any inputs? pls.

  • Timo Hahn
    Timo Hahn Senior Principal Technical Consultant - Oracle ACE Director Member, Moderator Posts: 38,727 Red Diamond

    As far as I understand this, your validation throws an error that will null some columns.

    Why do you commit the data before the validation?

    This doesn't make sense to me.


    Timo

  • User_7O0WQ
    User_7O0WQ Member Posts: 6 Green Ribbon

    The data initially goes into inject table and then there are PLSQL function calls happens to perform various validations. The value remains in VO for that column until before the second commit execution.. and the value sets to null DB after commit from ADF.

  • dvohra21
    dvohra21 Member Posts: 14,664 Gold Crown
    edited Aug 10, 2022 8:57PM

    Assuming database is Oracle, what is the column data type? Does calling getTransaction().commit() make a difference? Seems column value defaults to null because of validation error, or addition computational issue.