Skip to content

ModelMetaclass

ModelMetaclass

Bases: ModelMetaclass

Metaclass for BaseSBModel, adding a custom objects property.

This metaclass extends Pydantic's ModelMetaclass to provide a custom objects property on each class that uses it. The objects property returns a QSet instance, which is used for performing database queries related to the model.

Attributes:

Name Type Description
objects QSet[_M]

Returns a QSet instance for querying the model's table.

objects property

objects: QSet[_M]

Returns a QSet instance for querying the model's table. This is the primary interface for querying the database for instances of the model.