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

Exception:"Persistent class 'X' was specified as candidate, but..."

1 Answer 71 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.
NemFontos
Top achievements
Rank 1
NemFontos asked on 16 Feb 2009, 10:16 PM

Hi,

when I try to 'for each' on a IQueryResult I get:

InvalidOperaionException: "Persistent class 'Entities.Visit' was specified as candidate, but the ResultSet does not contain any/all of the pk columns."

Telerik.OpenAccess.dll is referenced. Exception throws in the foreach:

  IQuery sqlQuery = northwindScope.GetSqlQuery("SELECT * FROM tablename", typeof(classname), "");
IQueryResult result = sqlQuery.Execute();

foreach (classname v in result) yield return v; // InvalidOperaionExcepion thrown

Thanx if You have any idea

1 Answer, 1 is accepted

Sort by
0
NemFontos
Top achievements
Rank 1
answered on 16 Feb 2009, 10:55 PM
Ops...I had to upgrade to 2008.3.1327.2 and it's fixed. May it was a reverse engineering bug.
Tags
General Discussions
Asked by
NemFontos
Top achievements
Rank 1
Answers by
NemFontos
Top achievements
Rank 1
Share this question
or