New Posts New Posts RSS Feed: EntityQuery.AddOrderBy
  FAQ FAQ  Forum Search   Calendar   Register Register  Login Login

EntityQuery.AddOrderBy

 Post Reply Post Reply
Author
hojo View Drop Down
Newbie
Newbie


Joined: 05-Aug-2010
Posts: 1
Post Options Post Options   Quote hojo Quote  Post ReplyReply Direct Link To This Post Topic: EntityQuery.AddOrderBy
    Posted: 05-Aug-2010 at 2:47am
Dear reader,
 
using IdeaBlade DevForce Classic v3.7.1.0 we have encountered the following problem:
 
when using AddOrderBy() with an EntityQuery myquery using a nullable EntityColumn, there is a problem when using this query with pm.GetEntities<T>(myquery), _if_ the database actually contains null-values (for this column).
[I might add that myquery also uses "TOP", though I don't know whether that makes any difference.]
 
In this case the following error message appears:
 
 
If the table does not contain null-values (for this column) the query and ordering works fine.
 
If reading the entities into a list (without ordering) and using ApplySort afterwards on the list (for this column), ordering works fine.
 
[Unfortunately this seems to be no solution to us: using TOP the result set is just different, depending on whether sorting is used on SQL-level.]
 
Anyway, I would expect ordering to work already on SQL-level, whether the column is nullable or not, and whether there are null-values or not.
 
Can you reproduce this behaviour? Is there a solution to this?
 
Thanks for your reply
Jörg
 
Back to Top
 Post Reply Post Reply

Forum Jump Forum Permissions View Drop Down