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
It is currently not possible to share multiple instances of the same class within the context.
As a workaround, a new class with a list of the original instances can be used but it creates boilerplate code.
One solution could be to use id() function to separate instances instead of the instance type. But this means that get_or_create_model may return a list of instances or by convention returns the first occurrence.
But using id() opens the possibility to subscribe for updates only for one specific model (and as an extra feature to a class in general).
The text was updated successfully, but these errors were encountered:
It is currently not possible to share multiple instances of the same class within the context.
As a workaround, a new class with a list of the original instances can be used but it creates boilerplate code.
One solution could be to use
id()
function to separate instances instead of the instance type. But this means thatget_or_create_model
may return a list of instances or by convention returns the first occurrence.But using
id()
opens the possibility to subscribe for updates only for one specific model (and as an extra feature to a class in general).The text was updated successfully, but these errors were encountered: