You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
this option was added as kind of a one-off about 18 years ago to suit an example case for custom loading of relationships which I'd never recommend today. because the option turns off the related attribute entirely, it has all kinds of not easily predictable behaviors, it returns essentially incorrect results (e.g. None when there would normally be a collection there) and we continue to get complaints about other features not working when it's used e.g. #11040.
The one place people use this is when they have some kind of serializer that touches every attribute and they dont want an attribute to load. I think that's a bad use case. They should do one of 1. dont have that relationship there if it isnt part of the object's state 2. get a serializer that can select for which attributes you want to serialize and which you dont 3. eagerly load the collection there. it's no different from an object with a relationship that has a huge list of related objects already loaded and you don't want to serialize that either.
so let's just deprecate it and we dont have to deal with complaints anymore, people will write better programs.
The text was updated successfully, but these errors were encountered:
this option was added as kind of a one-off about 18 years ago to suit an example case for custom loading of relationships which I'd never recommend today. because the option turns off the related attribute entirely, it has all kinds of not easily predictable behaviors, it returns essentially incorrect results (e.g. None when there would normally be a collection there) and we continue to get complaints about other features not working when it's used e.g. #11040.
The one place people use this is when they have some kind of serializer that touches every attribute and they dont want an attribute to load. I think that's a bad use case. They should do one of 1. dont have that relationship there if it isnt part of the object's state 2. get a serializer that can select for which attributes you want to serialize and which you dont 3. eagerly load the collection there. it's no different from an object with a relationship that has a huge list of related objects already loaded and you don't want to serialize that either.
so let's just deprecate it and we dont have to deal with complaints anymore, people will write better programs.
The text was updated successfully, but these errors were encountered: