I'm trying to get the primary key generated from an oracle database function like described in the release notes for dotConnect for Oracle 6.30.
I have created a function like this:
create or replace function f_get_sequence return number
as
ll_seq number;
begin
select ocs_sequence.nextval into ll_seq from dual;
return ll_seq;
end;
On the table in the entity model I've set storegenerated pattern to identity and default value to f_get_sequence() on the primary key column.
But, it isn't working. Any thoughts on what I'm doing wrong?
Regards,
Jan Erik
Generate primary key from database function
In the release notes for 6.30 you write the following:
"To facilitate the process of development and to cease using simple INSERT triggers that set values of Identity columns, we make it possible to use database-specific functions as Default Value when inserting records into tables."
How do I accomplish this?
"To facilitate the process of development and to cease using simple INSERT triggers that set values of Identity columns, we make it possible to use database-specific functions as Default Value when inserting records into tables."
How do I accomplish this?
Sorry for the inconvenience. The current release contains a problem with the Default Value implementation for the Identity columns.
In the upcoming build the default value (no matter DefaultValue or devart:DefaultValue) will be inserted into DB if the InsertNullBehaviour is set either to InsertDefaultOrNull or to InsertDefaultOrOmit.
The upcoming build will be available in two weeks or so. I will notify you as soon as it is available.
In the upcoming build the default value (no matter DefaultValue or devart:DefaultValue) will be inserted into DB if the InsertNullBehaviour is set either to InsertDefaultOrNull or to InsertDefaultOrOmit.
The upcoming build will be available in two weeks or so. I will notify you as soon as it is available.
This problem is fixed in the latest 6.30.172 build of dotConnect for Oracle. The new build can be dowloaded from here (the trial version) or from Registered Users' Area (for users with active subscription only):
For the detailed information about the improvements and fixes available in dotConnect for Oracle 6.30.172, please refer to
this announcement.
For the detailed information about the improvements and fixes available in dotConnect for Oracle 6.30.172, please refer to
this announcement.