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
|
Hi, I have stored procedure with difficult calculation returning number of rows in format key/value. So I made transient Entity with key(int) value(decimal) as returning entity type for select procedure. When I run stored procedure directly in database, I get these results: 7 - 330.7 Three rows, different values. When I call the stored procedure from Lightspeed, I get three entities - but the first entity three times: 7 - 330.7 Here I have an example project. Is it some bug? Or is there a better way to read values from stored procedures returning plain values, not entities?
Thank you, this is really important to me. |
|
|
Your stored procedure does not return an Id. If your intent is that Key should be the Id, then you should remove Key from the list of entity properties, and set the entity's Identity Column Name to Key. (Or remove Key from the list of entity properties, then rename Key to Id in the sproc.) I believe current versions of LightSpeed will now throw an error (with a more meaningful message) when you try to load entities from a sproc and there is no Id column. |
|