SubSonic Forums
All Your Database Are Belong To Us

.IsLoaded incompatibility between Pakala and 2.0.x

Latest post 07-29-2008 12:57 PM by mathisjay. 3 replies.
  • 06-14-2008 3:10 AM

    .IsLoaded incompatibility between Pakala and 2.0.x

    Hi,

    With 2.0.x I am used to loading data by pk like this:

    Customer customer = new Customer("ALFKI");
    if (customer.IsLoaded)
        // the record was found ...

    This doesn't work any more with Pakala - the Load method seems to set isLoaded to true even if the reader has no records. To make it work I need to modify the condition like this:

    if (customer.IsLoaded && !customer.IsNew)

    I looked into the code and it looks like this was changed to support partial loads. Still, however, if there are no records returned I think isLoad should stay false. What do you guys think?

    Shall I post a fix for this?

    Martin

     

  • 06-16-2008 12:44 AM In reply to

    Re: .IsLoaded incompatibility between Pakala and 2.0.x

    I think you should post this to codeplex (I'm not sure what it should be.)

    If I am I because I am I, and You are You because You are You, then I am I, and you are you. But If I am I because You are You, and You are You because I am I, then I am not I and You are not You. -Rabbi of Kotzk

  • 07-23-2008 2:48 PM In reply to

    Re: .IsLoaded incompatibility between Pakala and 2.0.x

    Reply |Contact |Answer

    I am simply changing the few calls that I have in my codebase from IsLoaded to !IsNew and never using IsLoaded again :)

     

     

     

  • 07-29-2008 12:57 PM In reply to

    Re: .IsLoaded incompatibility between Pakala and 2.0.x

     I had the same problem.  I had to change all my code is use IsNew instead of IsLoaded

Page 1 of 1 (4 items) | RSS