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 load whole entities by SelectProcedure (class/table Client). Everything is ok, but loaded entites has null values in referenced entities (class/table Address). How should I edit my SP to load referenced entites (Address) to, or can Lightspeed somehow load referenced entites by eager load (when accessed first)? PS: Client to Address is one-to-one association with AddressId column in Client table. Thanks |
|
|
You cannot use eager loading with stored procedures. Remove the eager load setting from the associations. |
|
|
That's what I have thought. I've done before, but still no move. Address is still null. |
|
|
It's definitely working in our test environment. Could you provide us with a minimal but buildable repro project (console application or NUnit test) including the table and sproc definitions and sample data that exhibits the issue? |
|
|
Hi, I made a test project (web application). http://slownik.aspone.cz/Files/Pooik_Test.zip Just load the Default.aspx and you'll see.
If some explanation for project needed or something is missing, just let me know.
Thanks, Pooik |
|
|
Your stored procedure is not returning the AddressId. The stored procedure must return all the columns required to populate the entity. |
|
|
Oh, can I be so stupid? I probably added this association later and I didn't actualize the SP. Thanks! |
|