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:
http://www.ideablade.com/forum/uploads/886/EntityQuery_AddOrderBy.zip - uploads/886/EntityQuery_AddOrderBy.zip
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
|