6 Replies Latest reply on Jun 9, 2009 6:18 AM by Tschungel Buch

    Oracle Sequence grows inconsistently

    Tschungel Buch Newbie

      I have a view which is accessing a sequence via a function call within the view.

      This is the environment:

      Oracle Database 10g Enterprise Edition Release
      JBoss_SOA_Platform 4.3.GA

      The call in the view looks like below:

      CREATE VIEW vw_hibernate_test AS
      SELECT fr.id ID,
       CASE WHEN LAG (fr.id) OVER (ORDER BY fr.id) = fr.id
       LPAD (xmt_edi.f_get_seq_edi_isa_value (0), 9, '0')
       LPAD (xmt_edi.f_get_seq_edi_isa_value (1), 9, '0')
       END isa13
       FROM funding_report fr
       WHERE issue_date > SYSDATE-100

      Now this works as expected when called within oracle, but when calling the same via the JBOSS hibernate layers the sequece starts to grow leaving gaps in between the sequence, normally after 11 correct sequences there is a gap of 2.

      Is there anything I missed in the configuration of hibernate?