2 Replies Latest reply: Apr 29, 2013 11:02 AM by Rudy Meyer RSS

    Question on Entity attribute for table with PK populated by trigger

    Rudy Meyer
      Hello,

      I am looking for guidance on setting up my Entity Object. I am working with an existing db where the primary keys for the tables ( ID Number(10,0) ) is populated by a trigger on insert. Should the attribute type for the ID column be Integer or DBSequence? I originally set it up as DBSequence but when I perform a CreateInsert() on the form, populate values, then Commit(), the ID value is not populated in the form. I put a ppr on the form also. I can see the row in the db using sqlDeveloper and it is populated. I tried turning on the "refresh after insert" flag on the entity but then received the exception "JBO-28203: The updated row cannot be refreshed because its key values are unset or modified by database triggers.". I would like the ID so after the form is saved I can refresh a tree control and set the current row to the new row.

      Using 11.1.1.6
      Thank you - Rudy