Can't insert a Child data

Thread is closed for posting
2 posts, 0 answers
  1. S
    S avatar
    10 posts
    Member since:
    Nov 2013

    Posted 21 Jun 2015 Link to this post

    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.

  2. Boris Georgiev
    Boris Georgiev avatar
    190 posts

    Posted 25 Jun 2015 Link to this post


    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.

    Boris Georgiev
    Check out the latest announcement about Telerik Data Access vNext as a powerful framework able to solve core development problems.
Back to Top