New Posts New Posts RSS Feed: Stored Procedure Issue
  FAQ FAQ  Forum Search   Calendar   Register Register  Login Login

Stored Procedure Issue

 Post Reply Post Reply
ken.nelson View Drop Down

Joined: 03-Mar-2009
Location: Ann Arbor, MI
Posts: 54
Post Options Post Options   Quote ken.nelson Quote  Post ReplyReply Direct Link To This Post Topic: Stored Procedure Issue
    Posted: 15-Jun-2009 at 11:27am
We're attempting to use a stored prodecure to pull in data.  We've successfully imported the stored procedure, and have run the stored procedure 'successfully', meaning we've got data back from the stored procedure.  The problem is, it seems that the records we're getting back are missing some data.  Everything that is missing appears to be a foreign key to another table.  If the foreign key is nullable, the field value is null.  If the foreign key is not nullable, an exception is thrown.  I'm not even attempting to access the navigation properties, I'm literally trying to get at the keys, and the keys are bad.  When we run the stored proc in the database, the data returned is correct.
Is this expected?  Any idea what's going on?

Edited by ken.nelson - 15-Jun-2009 at 11:28am
Back to Top
kimj View Drop Down

Joined: 09-May-2007
Posts: 1391
Post Options Post Options   Quote kimj Quote  Post ReplyReply Direct Link To This Post Posted: 15-Jun-2009 at 7:02pm
This would be a bug.  The Entity Framework strips off key properties when any type of query is run, while DevForce does some fixup to add these properties back, in the form of the xx_fk_yy synthetic properties you see for entities in the domain model.  Unfortunately, DevForce isn't currently doing this fixup for the results of a stored procedure, with inconsistent and incorrect results. 
We've opened a defect report for this. 
Back to Top
 Post Reply Post Reply

Forum Jump Forum Permissions View Drop Down