This question is locked. New answers and comments are not allowed.
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:
In my database all PK fields have the same name, which is "ID".
Thanks for your help.
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:
- DatabaseSchema.png - shows relationships between tables;
- CorrectColumnCount.png - shows correct metadata info about table. I was using debugger to inspect the OA Context object;
- IvalidColumnCount.png - shows incorrect metadata info. This screen shot is created on the same OA Context object.
- 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
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.
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.
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.
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!
Thanks!
0
Accepted
Hello Dj Prpa,
Zoran
the Telerik team
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!
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
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
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
Hello Soham,
Damyan Bogoev
the Telerik team
Please find my answer in this thread.
Damyan Bogoev
the Telerik team
Telerik OpenAccess ORM Meets ASP.NET Web API. Read more.