Create entity does not return identity in Oracle external database
Question

I have a problem and I can't solve it.

I have a "Create Entity" from an external Oracle database. I can insert the records normally, but I do not receive the identifier as a return.

My connection:


My application:


My problem:


What am I doing wrong?


Thank you

mvp_badge
MVP
Solution

Hi,

The code looks good, It looks like you don't have set the Auto Generate checkbox on the entity definition in Integration Studio? So no new number is automatically generated by the database platform.

Regards,

Daniel

mvp_badge
MVP

Hi Ricardo,

It is unclear to mee what DATA_INcluirAlterarVariavel does, you didn't share the implementation.

Regards,

Daniel

Daniël Kuhlmann wrote:

Hi Ricardo,

It is unclear to mee what DATA_INcluirAlterarVariavel does, you didn't share the implementation.

Regards,

Daniel

 Hi Daniël , thanks for answering me.

 

Hi Daniël, thanks for answering me.

This is the implementation

mvp_badge
MVP

Still unclear, the assignment is what will tell me what returns the action.

I am including a record through a "create entity", but I don't get the return id.


The "CreateIBR_VARIAVEL" method was created automatically when I included the extension. He's not returning the identifier to me.


The extension is an external oracle database, where the primary key is generated through a sequence.

Data Module / Server Action : "DATA_IncluirAlterarVariavel"


Core Module / Server Action: "CORE_IncluirAlterarVariavel"


At this point, I can not retrieve the "Id" record

mvp_badge
MVP
Solution

Hi,

The code looks good, It looks like you don't have set the Auto Generate checkbox on the entity definition in Integration Studio? So no new number is automatically generated by the database platform.

Regards,

Daniel

Perfect, Daniel.

Thanks so much for your help.


Regards ,

Ricardo Nunes

Hi All, 

I'm having the same issue even with the auto-generated checkbox in the primary key of the external entity. 

Basically, every time I try to create a new record using the CreateOrUpdate action, no id is returned and the record's primary key is defined as 0 (or NullIdentifier).

Do you know what can be causing this issue?

Thanks in advance

Dear Joao,

I'm facing the same issue as yours, did you get the solution?

Hi Sherif, 

Yes, the purpose of the field 'Auto Generated' is not to define an identifier automatically in the external database but only for the platform to know if the table fields in the database are auto number/identity.

This being said, if the database/tables you are using do not have auto number/identity you will need to add application logic to create the id whenever a new record is created in the database. In case you use a database with tables where the auto number/identity is defined you shouldn't need to add more logic, just use the one that the scaffolding engine created.

Let me know if it helps you.

Community GuidelinesBe kind and respectful, give credit to the original source of content, and search for duplicates before posting.