From 1783f42d0ec0d29f7d0f6965d2658dc81a0babc9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andr=C3=A9=20Borngr=C3=A4ber?= Date: Sat, 27 May 2017 13:01:00 +0200 Subject: [PATCH] Issue #5 Inserting data into PK fixed --- OM_TAPIGEN_BODY.pkb | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/OM_TAPIGEN_BODY.pkb b/OM_TAPIGEN_BODY.pkb index dc1dcb6..452da5d 100755 --- a/OM_TAPIGEN_BODY.pkb +++ b/OM_TAPIGEN_BODY.pkb @@ -852,11 +852,12 @@ CREATE OR REPLACE PACKAGE BODY #TABLE_NAME_26#_api IS FUNCTION create_row( #PARAM_DEFINITION_W_PK# ) RETURN #TABLE_NAME#."#PK_COLUMN#"%TYPE IS v_pk #TABLE_NAME#."#PK_COLUMN#"%TYPE; - BEGIN' + BEGIN + v_pk := ' || CASE WHEN g_sequence_name IS NOT NULL THEN ' - v_pk := COALESCE( p_#PK_COLUMN_28#, #SEQUENCE_NAME#.nextval );' - ELSE NULL + COALESCE( p_#PK_COLUMN_28#, #SEQUENCE_NAME#.nextval );' + ELSE 'p_#PK_COLUMN_28#;' END || ' INSERT INTO #TABLE_NAME# ( #COLUMN_LIST_W_PK# )