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
|
When I call a stored procedure via an entity and IList, I am getting the correct number of results, but they are all clones of the first row. The sproc is returning the correct result set in management studio and the sproc call and results were working fine just before an upgrade to the latest nightly build(2.2.1240.11893). I think this is a bug? What might cause repetition of the first row in a result set? Thanks!
|
|
|
We're not able to reproduce this problem: loading from stored procs is behaving correctly in all our tests. One possibility is that something is amiss with the IDs or the ID mapping. Depending on what version you're upgrading from, I think we did make a change about how we located the ID when loading from a sproc. It used to be that we assumed the first column was the ID. Now I think we require that the identity column be named Id (or that you set TableAttribute.IdColumnName on the entity to specify the name of the column). If that were the issue I think we would be reporting an "Id field not found" error rather than duplicating results, but it might be worth a check. Assuming that's not the issue, could you provide us with a repro please? Ideally we'd like: * a small complete console or NUnit test project that contains the required entity definition(s) and the code that loads the duplicate entities * the database definitions for the stored procedure and any necessary backing tables, plus ideally a sample data set that exhibits the problem. If you're using SQL Server, a detached MDF file is a convenient way of shipping these, otherwise a SQL script with the CREATE PROCEDURE, CREATE TABLE and INSERT statements. You can attach a zip file via the Options tab, or email it to us directly on ivan @ the obvious domain name (please strip out all binaries first). Also, if you could let us know which build you were using before the upgrade, that would help us locate whatever change might have introduced this bug. If you revert to the version you had before, can you confirm that the problem goes away? Thanks for reporting this issue and for your help in reproducing it! |
|
|
I modified the sproc to return a column named Id and renamed one or the entity properties to Id and it works fine now. Thanks!
|
|