OA Context Metadata issues

10 posts, 1 answers
  1. Dj Prpa
    Dj Prpa avatar
    20 posts
    Member since:
    Aug 2012

    Posted 30 Nov 2011 Link to this post

    I have a child table that has two FK fields. When I tried to insert a record, I was getting the following error:

    Message=Insert of '784836964-f14effd3-081b-e111-b467-a4badbf99a93' failed:
    Telerik.OpenAccess.RT.sql.SQLException: Invalid column name 'ID2'. Invalid column name 'ID3'.

    Columns ID2 and ID3 do not exist in my table. Those columns were generated by OA during the creation of RLINQ file. I have attached the following images that could help you understand the issue:
    1. DatabaseSchema.png - shows relationships between tables;
    2. CorrectColumnCount.png - shows correct metadata info about table. I was using debugger to inspect the OA Context object;
    3. IvalidColumnCount.png - shows incorrect metadata info. This screen shot is created on the same OA Context object.
    4. InvalidColumn_ID2.png and  InvalidColumn_ID3.png - shows detailed info about columns generated by OA.

    In my database all PK fields have the same name, which is "ID". 

    Thanks for your help.
  2. B. Scheper
    B. Scheper avatar
    2 posts
    Member since:
    Feb 2009

    Posted 30 Nov 2011 Link to this post

    Hi Dj,

    I have exactly the same problem. during runtime there are suddenly id2 and id3 columnnames in the select query.
    This only happens when i am using model-first. Because i ran into a bug in the Fluent api (code-first), the join-tables weren't created anymore, i was forced to use model-first. but this doesn't turn out to be a great success.

    I am very interested in the answer from telerik on your issue.
  3. DevCraft banner
  4. Dj Prpa
    Dj Prpa avatar
    20 posts
    Member since:
    Aug 2012

    Posted 30 Nov 2011 Link to this post

    Hi B.Scheper,

    In my case I was using the model-first approach too.
  5. Dj Prpa
    Dj Prpa avatar
    20 posts
    Member since:
    Aug 2012

    Posted 30 Nov 2011 Link to this post

    I have renamed all my PK fields but the problem still exists. The only difference is in the error message which now shows changed field names: "Telerik.OpenAccess.RT.sql.SQLException: Invalid column name 'ETLErrorID2'. Invalid column name 'TextFileLogID2'."

    I am on a very tight deadline here and I would appreciate if someone at Telerik tells me how to fix this issue. 
  6. Dj Prpa
    Dj Prpa avatar
    20 posts
    Member since:
    Aug 2012

    Posted 30 Nov 2011 Link to this post

    Installing the latest version of OA (2011.3.1129.2) fixed the issue. Very nice job Telerik :).

    Thanks!

  7. Answer
    Zoran
    Admin
    Zoran avatar
    534 posts

    Posted 02 Dec 2011 Link to this post

    Hello Dj Prpa,

     Great to know that your issue has been fixed with the service pack. I hope that this is also a fact for the other participants in this forum thread.

    All the best,
    Zoran
    the Telerik team

    Q3’11 of Telerik OpenAccess ORM is available for download. Register for the What's New in Data Tools webinar to see what's new and get a chance to WIN A FREE LICENSE!

  8. B. Scheper
    B. Scheper avatar
    2 posts
    Member since:
    Feb 2009

    Posted 06 Dec 2011 Link to this post

    Hi Dj Prpa,

    yes, my problems are solved. i switched back to code-first because i like this concept and don't want to work in a visual editor.
    Thanks!
  9. Soham
    Soham avatar
    8 posts
    Member since:
    Sep 2012

    Posted 11 Nov 2012 Link to this post

    Hi Guys,

    I faced the same problem, I have posted my solution here

    Id2 Telerik ORM Issue
  10. Soham
    Soham avatar
    8 posts
    Member since:
    Sep 2012

    Posted 14 Nov 2012 Link to this post

    Hello,

    I would request some assistance from telerik regarding how to get over with this multiple association issue which eventually results in auto-generated id's. At least let me know why is this multiple associations generated on the first place.

    Can some one please help me out on this?? Need it badly.

    Thanks,
    Soham Gupta
  11. Damyan Bogoev
    Admin
    Damyan Bogoev avatar
    581 posts

    Posted 19 Nov 2012 Link to this post

    Hello Soham,

    Please find my answer in this thread.

    Regards,
    Damyan Bogoev
    the Telerik team
    Telerik OpenAccess ORM Meets ASP.NET Web API. Read more.
Back to Top
DevCraft banner