Search code examples
javajsforacle-adfjdeveloper

How to use ADF CreateInsert when having a sequence generated ID trigger in my database?


I'm having an exception all the time when trying to add a new entity :

All fields are filled in, only ID is missing.

I'm adding an image :

Visual Problem


Solution

  • For solving this problem it is necessary to change the type of the entity. Open the Entity Object, go to attributes tab, select ID field and in property inspector tab change Type NUMBER to DBSequence.

    Visual Solution

    In the case that you have an ID of type BigDecimal, it's necessary to double click the attribute to make appear "Edit Attribute" Popup, then in browse for the Type label, and search oracle.jpo.doman.DBSequence, then do OK.

    Edit Attribute Popup after clicking Browse button

    Browning Hierarchy tab until finding DBSequence