CodeSmith Community
Your Code. Your Way. Faster!

Possible BUG : DeepLoad Annoyance

Latest post 10-23-2006 4:45 PM by icecold_2. 8 replies.
  • 09-20-2006 8:54 AM

    • tecknick
    • Top 500 Contributor
    • Joined on 07-29-2006
    • Perth, Western Australia
    • Posts 13
    • Points 305

    Possible BUG : DeepLoad Annoyance

    Howdy,

    Let's say I have the following relationship where ClassB conains a ClassC(Source) and it contains a ClassD(Source) as follows :

    ClassB (1 -> 1) ClassC (1 - > 1) ClassD

    OK, given the relationship above, let's say I have a ClassA which contains a collection of ClassB(Source) called CollectionB and I would like to DeepLoad ClassA where the include child types are CollectionB, ClassC and ClassD.

    Let's say that the id's of the first 2 elements of CollectionA and their child types which should be loaded are as follows :

    CollectionB[0](Id:11) -> ClassC (Id:44) -> ClassD (Id:77)

    CollectionB[1](Id:22) -> ClassC (Id:55) -> ClassD (Id:77)

    When using the Deepload functionality of nettiers, the first element of collection deeploads correctly but the ClassD instance in the second element is not loaded. The reason behind this is that the HasProperty method seems to signal that the ClassD with 77 as an id has already been loaded within the object graph and does not load the remainder instances of any ClassD objects with this id.

    I presume that this is used to stop recursive loading.

    Would it not be better to simply hold a reference to the already existing ClassD and use that reference instead of setting it to null?  Therefore if a reference is used, we can presume that it has already been deeploaded and therefore do not need to deepload it again and hence resolving the recursive issue that this was created to solve.

    Hopefully my example was easy to follow.

    Thanks Tecknick

    • Post Points: 5
  • 09-20-2006 7:03 PM In reply to

    • tecknick
    • Top 500 Contributor
    • Joined on 07-29-2006
    • Perth, Western Australia
    • Posts 13
    • Points 305

    Re: Possible BUG : DeepLoad Annoyance

    As the description above may be a bit confusing, I have attached an example DB which can be used to demonstrate the issue.

    Deeploading an A Class as follows :

    A classA = new AService().DeepLoadById(123, true, TestDB.Data.DeepLoadType.IncludeChildren, new Type[]{ typeof(TList<B>), typeof(C), typeof(D)});

    produces the following result :

    classA.BCollection[0].CIdSource.DIdSource is set to an object with Id 77

    classA.BCollection[1].CIdSource.DIdSource is set to NULL (It should also be an object with Id 77)

    Hope this helps.

    Tecknick

    • Post Points: 35
  • 09-20-2006 11:16 PM In reply to

    Re: Possible BUG : DeepLoad Annoyance

    Thanks for the sample, we'll take a look at it.

    Robert Hinojosa
    -------------------------------------
    Member of the Codesmith Tools, .netTiers, teams
    http://www.nettiers.com
    -------------------------------------
    • Post Points: 5
  • 09-20-2006 11:18 PM In reply to

    Re: Possible BUG : DeepLoad Annoyance

    Also, is this behavior is just with the Parent Source properties correct? 

    Robert Hinojosa
    -------------------------------------
    Member of the Codesmith Tools, .netTiers, teams
    http://www.nettiers.com
    -------------------------------------
    • Post Points: 65
  • 09-21-2006 5:46 AM In reply to

    • tecknick
    • Top 500 Contributor
    • Joined on 07-29-2006
    • Perth, Western Australia
    • Posts 13
    • Points 305

    Re: Possible BUG : DeepLoad Annoyance

    I am not 100% sure but I think it is only Parent Source properties.
    • Post Points: 5
  • 10-10-2006 2:12 AM In reply to

    • seano288
    • Not Ranked
    • Joined on 10-10-2006
    • Posts 1
    • Points 5

    Re: Possible BUG : DeepLoad Annoyance

    I'm also experiencing this problem. I just upgraded to v2.0.0.387 but am still having problems with deep save.  In the changes.log a fix is listed on 9/25 for deepsave, did this fix address the issue cited in this thread?  As I debug, it is clear that my problem is the HasProperty() method returns false when the entity does indeed have the property.

     

    Let me know if this bug is still being looked into, or if it was fixed on 9/25.  A lot of my code is broken because of this and I'm going to have to role back.

     

    Thanks,

    Sean 

    • Post Points: 5
  • 10-15-2006 5:06 AM In reply to

    • tecknick
    • Top 500 Contributor
    • Joined on 07-29-2006
    • Perth, Western Australia
    • Posts 13
    • Points 305

    Re: Possible BUG : DeepLoad Annoyance

    Hey

    Still does not seem to be sorted.

    Any idea Robert on when this one will be sorted?  I am sure you guys have plenty on your plate.  Just that it is a little irritating.

    Cheers

    Tecknick

     

    • Post Points: 35
  • 10-15-2006 1:41 PM In reply to

    Re: Possible BUG : DeepLoad Annoyance

    Hi, I've been knee deep with CodeSmith related tasks, but will try and get this done tonight.  I've got another solution brewing in my head, I just need time to do it.

    Robert

     
    On 10/15/06, tecknick <bounce-tecknick@codesmithsupport.com> wrote:

    Hey

    Still does not seem to be sorted.

    Any idea Robert on when this one will be sorted?  I am sure you guys have plenty on your plate.  Just that it is a little irritating.

    Cheers

    Tecknick

     






    Robert Hinojosa
    -------------------------------------
    Member of the Codesmith Tools, .netTiers, teams
    http://www.nettiers.com
    -------------------------------------
    • Post Points: 35
  • 10-23-2006 4:45 PM In reply to

    Re: Possible BUG : DeepLoad Annoyance

    What's the status of this?
    • Post Points: 5
Page 1 of 1 (9 items) | RSS
Copyright © 2008 CodeSmith Tools, LLC
Powered by Community Server (Commercial Edition), by Telligent Systems