rename relationshipmanager
This commit is contained in:
@ -1,4 +1,4 @@
|
||||
from ormar.models.model import Model
|
||||
from ormar.models.newbasemodel import NewBaseModel
|
||||
from ormar.models.model import Model
|
||||
|
||||
__all__ = ["NewBaseModel", "Model"]
|
||||
|
||||
@ -10,12 +10,12 @@ from ormar import ForeignKey, ModelDefinitionError # noqa I100
|
||||
from ormar.fields import BaseField
|
||||
from ormar.fields.foreign_key import ForeignKeyField
|
||||
from ormar.queryset import QuerySet
|
||||
from ormar.relations import RelationshipManager
|
||||
from ormar.relations import AliasManager
|
||||
|
||||
if TYPE_CHECKING: # pragma no cover
|
||||
from ormar import Model
|
||||
|
||||
relationship_manager = RelationshipManager()
|
||||
relationship_manager = AliasManager()
|
||||
|
||||
|
||||
class ModelMeta:
|
||||
@ -26,7 +26,7 @@ class ModelMeta:
|
||||
columns: List[sqlalchemy.Column]
|
||||
pkname: str
|
||||
model_fields: Dict[str, Union[BaseField, ForeignKey]]
|
||||
_orm_relationship_manager: RelationshipManager
|
||||
_orm_relationship_manager: AliasManager
|
||||
|
||||
|
||||
def register_relation_on_build(table_name: str, field: ForeignKey, name: str) -> None:
|
||||
|
||||
@ -22,7 +22,7 @@ import ormar # noqa I100
|
||||
from ormar.fields import BaseField
|
||||
from ormar.models.metaclass import ModelMeta, ModelMetaclass
|
||||
from ormar.models.modelproxy import ModelTableProxy
|
||||
from ormar.relations import RelationshipManager
|
||||
from ormar.relations import AliasManager
|
||||
|
||||
if TYPE_CHECKING: # pragma no cover
|
||||
from ormar.models.model import Model
|
||||
@ -45,7 +45,7 @@ class NewBaseModel(pydantic.BaseModel, ModelTableProxy, metaclass=ModelMetaclass
|
||||
__tablename__: str
|
||||
__metadata__: sqlalchemy.MetaData
|
||||
__database__: databases.Database
|
||||
_orm_relationship_manager: RelationshipManager
|
||||
_orm_relationship_manager: AliasManager
|
||||
Meta: ModelMeta
|
||||
|
||||
# noinspection PyMissingConstructor
|
||||
|
||||
Reference in New Issue
Block a user