This is a migrated thread and some comments may be shown as answers.

Can't insert a Child data

1 Answer 49 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
This question is locked. New answers and comments are not allowed.
S
Top achievements
Rank 1
S asked on 22 Jun 2015, 02:16 AM

I have to table,

MainTableA - id, description

TableAhasa- MainTableA_id(FK), OtherTableB_id(FK)

 

I got an error when doing inserting new record in child

Firstly, I inserted in a MainTableA (Flush Changes ) and got its id

Then, I inserted into the TableAhasa (It failed here)

How can I solve this problem? I would like to maintain my logic. I tried to set the "Is Managed" to true. in the relationship still didn't work. Any idea.

1 Answer, 1 is accepted

Sort by
0
Boris Georgiev
Telerik team
answered on 25 Jun 2015, 06:47 AM
Hello,

Could you give us more information about your scenario? What is the error which is thrown when you add a child in the table?

From the description which you sent you have two foreign key constraint in the child table, but you mentioned that you are adding an entity only in the one of the parent tables. Do you have an existing entity in the other parent table that you are linking?

I am looking forward to hearing from you.

Regards,
Boris Georgiev
Telerik
 
Check out the latest announcement about Telerik Data Access vNext as a powerful framework able to solve core development problems.
Tags
General Discussions
Asked by
S
Top achievements
Rank 1
Answers by
Boris Georgiev
Telerik team
Share this question
or