We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 16348
    • 64 Posts
    Hi,

    when I collect an object graph via getObjectGraph the returned object is lazy and I can't update it.
    Do I have to grab the object one more time via getObject or what should I do to make the object "non lazy"?

    Best regards
    Kristoffer [ed. note: Kristoffer last edited this post 14 years ago.]
      • 22303 MODX Staff
      • 10,725 Posts
      You must load ALL of the fields of the object for it not to be lazy. You can load partial objects using the "lazy loading" technique, but in order to save changes to them, you must load all of the field values.
        • 16348
        • 64 Posts
        Thank you opengeek for your reply.

        I have to admit that my problem was due to a typo in my mysql class map. I added a new field to my database table and edited the class map directly instead of regenerate them from my schema file. Now I learned the hard way that this was a bad idea.