This thread looks to be a little on the old side and therefore may no longer be relevant. Please see if there is a newer thread on the subject and ensure you're using the most recent build of any software if your question regards a particular product.
This thread has been locked and is no longer accepting new posts, if you have a question regarding this topic please email us at support@mindscape.co.nz
|
Another issue I have with views is that when i use LINQ Paging - Skip() and Take() with my view and have specified no special order by, the generated SQL tries to make the sort by a non-existing "Id" column. OK, possibly it doesn't make sense to use paging without specifying an order by, but getting exception in run-time with a non-existing column is a bit awkward... Hmmm... Making the default ID column name to at least some column actually existing in the view sounds to me maybe as a "less worse" solution than getting a run-time error. But, not sure... |
|
|
This goes deeper than sort. LightSpeed needs an identity column. By default, it expects an identity column named Id. If your identity column isn't named Id, you must specify the Identity Column Name. If your view doesn't have an Id column (and you haven't customised the Identity Column Name), I'm actually surprised LightSpeed can load from it at all! For tables, the designer does this automatically from the primary key, but it can't do this for views (as a view doesn't have a PK). If the unique ID column for the view isn't named Id, you must enter this yourself. We believe this is better than us just quietly guessing as we would probably pick an "identity" column which isn't actually unique, which would cause LightSpeed to fail in numerous interesting ways! |
|
|
Thanks, Ivan. I see your point. We will follow this pattern - all views will have "Id" column. Could you please also take a look at the other issue I found with views: |
|