creating an id for two parent table and child table tables

please need to use an id in two tables because the parent table is not sending the ID to the inherited table (child), it is giving KEY 0 error because the inherited table is not receiving ID can someone help me

Hi Marcelino,

What do you mean with the parent table is not sending the ID to the inherited table (child) ?

tables do not send things in OutSystems.


what do you mean with inherited table ?

There is no concept of inheritance in OutSystems.


You need to describe or illustrate better what is your problem for someone to be able to understand you and help you. A screen shot or OML of the logic can help.

Regards,

Daniel



Marcilio Santos wrote:

please need to use an id in two tables because the parent table is not sending the ID to the inherited table (child), it is giving KEY 0 error because the inherited table is not receiving ID can someone help me

Are you passing the data from the parent table to the child? or are you trying to do a 1-1 relationship?


on the second table try to set the Identifier of it the value of the parent Identifier

Hi Marcilio,

Are you trying to create records for an Entity with a mandatory foreign key to another Entity? You need to assign those values manually when you're creating the records.

If you post screenshots of your code or the module file it will be easier to help.

Hi Marcilio,

There is nothing like inheriting I’d from parent to child table , in such cases you have to first create data in your parent table and than you can use the created  I’d in your child table to make a proper parent child relationship.

You have to write this code to set parent I’d in child record before creating a new child record.


Regards,

-PJ-

Daniël Kuhlmann escreveu:

Olá Marcelino,

O que você quer dizer com a tabela pai não está enviando o ID para a tabela herdada (filho)  ? 

tabelas não enviam itens no OutSystems.


o que você quer dizer com tabela herdada  ?

Não há conceito de herança no OutSystems.


Você precisa descrever ou ilustrar melhor qual é o seu problema para que alguém possa entendê-lo e ajudá-lo. Uma captura de tela ou OML da lógica pode ajudar.

Saudações,

Daniel





Marcilio Santos wrote:

Daniël Kuhlmann escreveu:

Olá Marcelino,

O que você quer dizer com a tabela pai não está enviando o ID para a tabela herdada (filho)  ? 

tabelas não enviam itens no OutSystems.


o que você quer dizer com tabela herdada  ?

Não há conceito de herança no OutSystems.


Você precisa descrever ou ilustrar melhor qual é o seu problema para que alguém possa entendê-lo e ajudá-lo. Uma captura de tela ou OML da lógica pode ajudar.

Saudações,

Daniel





What? 


Daniël Kuhlmann wrote:

Hi Marcelino,

What do you mean with 

tables do not send things in OutSystems.


what do you mean with inherited table ?

There is no concept of inheritance in OutSystems.


You need to describe or illustrate better what is your problem for someone to be able to understand you and help you. A screen shot or OML of the logic can help.

Regards,

Daniel



Olá Daniel Bom dia!
Estou te enviando a imagem do diagrama de entidade relacionamento das entidades Cliente-Empresa-Contato, so pra explicar melhor a empresa possui uma PK e uma FK em contato que quando cadastramos a empresa registramos os contatos da empresa nesta entidade, na entidade cliente possui uma PK do tipo Empresa Identifier, pois cliente e uma empresa tambem na entidade cliente possui uma FK para gerar relacionamento de empresa com cliente, mais a entidade cliente não esta gerando um ID e por concequencia não esta gravando na tabela. / 

Hello Daniel Good morning!
I am sending you the image of the entity relationship diagram of the Customer-Company-Contact entities, just to better explain the company has a PK and a contact FK that when we register the company we register the company contacts in this entity, the client entity has a PK of the type Company Identifier, because client and a company also in the client entity have an FK to generate company-client relationship, but the client entity is not generating an ID and is not saving to the table.

E essas são as entidades / And these are the entities


Thanks for your attention I hope I have clarified better


Marvei Nii~ wrote:

Marcilio Santos wrote:

please need to use an id in two tables because the parent table is not sending the ID to the inherited table (child), it is giving KEY 0 error because the inherited table is not receiving ID can someone help me

Are you passing the data from the parent table to the child? or are you trying to do a 1-1 relationship?


We are trying to pass the data first to the parent, and then to the child. Before we pass the data to the child we're using an assign to sinalize that it should use its parent id [recently created]. I've just posted an entity diagram. Please take a look and I think it's going to be more cristal clear for you.

Thank you very much.