You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When calling Paged() with empty orderBy the following exception occurs:
InvalidOperationException: No primary key field(s) have been specified
Mighty.Keys.PrimaryKeyInfo.CheckGetPrimaryKeyColumns()
Maybe the exception thrown should be something more telling, I just spent couple of hours debugging what was going on with either the DB, connection string or mapping only to find out the orderBy paramater sent into Paged() was empty.
The text was updated successfully, but these errors were encountered:
brgrz
changed the title
InvalidOperationException: No primary key field(s) have been specified Mighty.Keys.PrimaryKeyInfo.CheckGetPrimaryKeyColumns()
InvalidOperationException: No primary key field(s) have been specified
Aug 27, 2019
Fair point! As I've been using Mighty myself, I've been updating exception messages to be more helpful where possible (changes not pushed to live yet, though). At first I thought I'd already come across this one myself, but looking around the code I don't think I have. I'll leave this open and add it to a (hopefully near) future update.
mikebeaton
changed the title
InvalidOperationException: No primary key field(s) have been specified
InvalidOperationException: No primary key field(s) have been specified, when calling Paged() with empty orderBy
Oct 16, 2019
When calling
Paged()
with emptyorderBy
the following exception occurs:Maybe the exception thrown should be something more telling, I just spent couple of hours debugging what was going on with either the DB, connection string or mapping only to find out the orderBy paramater sent into Paged() was empty.
The text was updated successfully, but these errors were encountered: