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

OA Context Metadata issues

9 Answers 137 Views
Development (API, general questions)
This is a migrated thread and some comments may be shown as answers.
This question is locked. New answers and comments are not allowed.
Dj Prpa
Top achievements
Rank 1
Dj Prpa asked on 30 Nov 2011, 06:01 AM
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.

9 Answers, 1 is accepted

Sort by
0
B. Scheper
Top achievements
Rank 1
answered on 30 Nov 2011, 11:38 AM
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.
0
Dj Prpa
Top achievements
Rank 1
answered on 30 Nov 2011, 01:10 PM
Hi B.Scheper,

In my case I was using the model-first approach too.
0
Dj Prpa
Top achievements
Rank 1
answered on 30 Nov 2011, 10:43 PM
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. 
0
Dj Prpa
Top achievements
Rank 1
answered on 01 Dec 2011, 02:56 AM
Installing the latest version of OA (2011.3.1129.2) fixed the issue. Very nice job Telerik :).

Thanks!

0
Accepted
Zoran
Telerik team
answered on 02 Dec 2011, 03:05 PM
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!

0
B. Scheper
Top achievements
Rank 1
answered on 06 Dec 2011, 10:11 AM
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!
0
Soham
Top achievements
Rank 2
answered on 11 Nov 2012, 09:47 PM
Hi Guys,

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

Id2 Telerik ORM Issue
0
Soham
Top achievements
Rank 2
answered on 14 Nov 2012, 08:28 PM
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
0
Damyan Bogoev
Telerik team
answered on 19 Nov 2012, 04:00 PM
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.
Tags
Development (API, general questions)
Asked by
Dj Prpa
Top achievements
Rank 1
Answers by
B. Scheper
Top achievements
Rank 1
Dj Prpa
Top achievements
Rank 1
Zoran
Telerik team
Soham
Top achievements
Rank 2
Damyan Bogoev
Telerik team
Share this question
or