§ <ˆj!ãóF—dZddlmZddlZddlZddlmZddlmZddlmZ ddl m Z dd l m Z dd l mZdd l mZdd l mZdd l mZddl mZddlmZddlmZddlmZddlmZddlmZddlmZddlmZddlmZddlmZddlmZddlmZddlm Z ddl!m"Z"ddl!m#Z#ddl!m$Z$ddl!m%Z%dd l!m&Z&dd!l!m'Z'dd"l!m(Z(d#„Z)d$„Z*ej+ej, -d%d&¬'¦«Gd(„d)e¦«¦«¦«Z.d*„Z/Gd+„d,e0¦«Z1Gd-„d.e0¦«Z2dS)/a Heuristics related to join conditions as used in :func:`_orm.relationship`. Provides the :class:`.JoinCondition` object, which encapsulates SQL annotation and aliasing behavior focused on the `primaryjoin` and `secondaryjoin` aspects of :func:`_orm.relationship`. é)Úabsolute_importNé)Ú attributes)Ú dependency)Úmapper)Ú_is_mapped_class)Ú state_str)Ú MANYTOMANY)Ú MANYTOONE)Ú ONETOMANY)ÚPropComparator)ÚStrategizedProperty)Ú _orm_annotate)Ú_orm_deannotate)ÚCascadeOptionsé)Úexc)Úlog)Úschema)Úsql)Úutil)Úinspect)Ú expression)Ú operators)Úvisitors)Ú_deep_deannotate)Ú_shallow_annotate)Úadapt_criterion_to_null)Ú ClauseAdapter)Újoin_condition)Úselectables_overlap©Úvisit_binary_productcóJ—ttj|¦«ddi¦«S)aAnnotate a portion of a primaryjoin expression with a 'remote' annotation. See the section :ref:`relationship_custom_foreign` for a description of use. .. seealso:: :ref:`relationship_custom_foreign` :func:`.foreign` ÚremoteT©Ú_annotate_columnsrÚ_clause_element_as_expr©Úexprs úS/opt/cloudlinux/venv/lib64/python3.11/site-packages/sqlalchemy/orm/relationships.pyr%r%4s+€õ ÝÔ*¨4Ñ0Ô0°8¸TÐ2Bñ ô ðócóJ—ttj|¦«ddi¦«S)aAnnotate a portion of a primaryjoin expression with a 'foreign' annotation. See the section :ref:`relationship_custom_foreign` for a description of use. .. seealso:: :ref:`relationship_custom_foreign` :func:`.remote` ÚforeignTr&r)s r+r.r.Gs+€õ ÝÔ*¨4Ñ0Ô0°9¸dÐ2Cñ ô ðr,zsqlalchemy.orm.propertiesT)Ú add_to_allc"󬇗eZdZdZdZeddddd¬¦«ZdZej d¬¦«ddddddddddddd ded ed ded dddddded eddddddddf!ˆfd„ ¦«Z d„Z d„Z Gd„de ¦«Zd0d„Z d1d„Zd„Zd2d„Zd„Zd„Zejfd„Z d3d„Zed„¦«Zed„¦«Zd„Zejd„¦«Zejd „¦«Z ˆfd!„Z!d"„Z"d#„Z#d$„Z$ed%„¦«Z%e%j&d&„¦«Z%d4d'„Z'd(„Z(d)„Z)d*„Z*d+„Z+d,„Z,ejd-„¦«Z-ejd.„¦«Z. d5d/„Z/ˆxZ0S)6ÚRelationshipPropertyzÿDescribes an object property that holds a single item or list of items that correspond to a related database table. Public constructor is the :func:`_orm.relationship` function. .. seealso:: :ref:`relationship_config_toplevel` Ú relationshipFT©Úpassive_deletesÚpassive_updatesÚenable_typechecksÚactive_historyÚcascade_backrefsN)z0.7zÄ:class:`.AttributeExtension` is deprecated in favor of the :class:`.AttributeEvents` listener interface. The :paramref:`_orm.relationship.extension` parameter will be removed in a future release.)Ú extensionÚselectr4r5r6r7r8c#ó•—tt|¦« ¦«||_||_||_||_||_| |_d|_ | |_ | r|  |||||¬¦«| r|"rtj d¦«‚|"|_||_||_||_||_||_||_||_||_||_||_||_||_||_||_||_|!rt=jd¦«|!|_ ||_!| |_"||_#||_$|p tj%|_&| &|d¦«|_'t=j(|¦«| �| |_)d|jff|_*tW¦«|_,| dur| |_-n| .dd¬¦«||_/| |_0|j0r|rtj d ¦«‚d|_1dS||_1dS) ah’Provide a relationship between two mapped classes. This corresponds to a parent-child or associative table relationship. The constructed class is an instance of :class:`.RelationshipProperty`. A typical :func:`_orm.relationship`, used in a classical mapping:: mapper(Parent, properties={ 'children': relationship(Child) }) Some arguments accepted by :func:`_orm.relationship` optionally accept a callable function, which when called produces the desired value. The callable is invoked by the parent :class:`_orm.Mapper` at "mapper initialization" time, which happens only when mappers are first used, and is assumed to be after all mappings have been constructed. This can be used to resolve order-of-declaration and other dependency issues, such as if ``Child`` is declared below ``Parent`` in the same file:: mapper(Parent, properties={ "children":relationship(lambda: Child, order_by=lambda: Child.id) }) When using the :ref:`declarative_toplevel` extension, the Declarative initializer allows string arguments to be passed to :func:`_orm.relationship`. These string arguments are converted into callables that evaluate the string as Python code, using the Declarative class-registry as a namespace. This allows the lookup of related classes to be automatic via their string name, and removes the need for related classes to be imported into the local module space before the dependent classes have been declared. It is still required that the modules in which these related classes appear are imported anywhere in the application at some point before the related mappings are actually used, else a lookup error will be raised when the :func:`_orm.relationship` attempts to resolve the string reference to the related class. An example of a string- resolved class is as follows:: from sqlalchemy.ext.declarative import declarative_base Base = declarative_base() class Parent(Base): __tablename__ = 'parent' id = Column(Integer, primary_key=True) children = relationship("Child", order_by="Child.id") .. seealso:: :ref:`relationship_config_toplevel` - Full introductory and reference documentation for :func:`_orm.relationship`. :ref:`orm_tutorial_relationship` - ORM tutorial introduction. :param argument: A mapped class, or actual :class:`_orm.Mapper` instance, representing the target of the relationship. :paramref:`_orm.relationship.argument` may also be passed as a callable function which is evaluated at mapper initialization time, and may be passed as a string name when using Declarative. .. warning:: Prior to SQLAlchemy 1.3.16, this value is interpreted using Python's ``eval()`` function. **DO NOT PASS UNTRUSTED INPUT TO THIS STRING**. See :ref:`declarative_relationship_eval` for details on declarative evaluation of :func:`_orm.relationship` arguments. .. versionchanged 1.3.16:: The string evaluation of the main "argument" no longer accepts an open ended Python expression, instead only accepting a string class name or dotted package-qualified name. .. seealso:: :ref:`declarative_configuring_relationships` - further detail on relationship configuration when using Declarative. :param secondary: For a many-to-many relationship, specifies the intermediary table, and is typically an instance of :class:`_schema.Table`. In less common circumstances, the argument may also be specified as an :class:`_expression.Alias` construct, or even a :class:`_expression.Join` construct. :paramref:`_orm.relationship.secondary` may also be passed as a callable function which is evaluated at mapper initialization time. When using Declarative, it may also be a string argument noting the name of a :class:`_schema.Table` that is present in the :class:`_schema.MetaData` collection associated with the parent-mapped :class:`_schema.Table`. .. warning:: When passed as a Python-evaluable string, the argument is interpreted using Python's ``eval()`` function. **DO NOT PASS UNTRUSTED INPUT TO THIS STRING**. See :ref:`declarative_relationship_eval` for details on declarative evaluation of :func:`_orm.relationship` arguments. The :paramref:`_orm.relationship.secondary` keyword argument is typically applied in the case where the intermediary :class:`_schema.Table` is not otherwise expressed in any direct class mapping. If the "secondary" table is also explicitly mapped elsewhere (e.g. as in :ref:`association_pattern`), one should consider applying the :paramref:`_orm.relationship.viewonly` flag so that this :func:`_orm.relationship` is not used for persistence operations which may conflict with those of the association object pattern. .. seealso:: :ref:`relationships_many_to_many` - Reference example of "many to many". :ref:`orm_tutorial_many_to_many` - ORM tutorial introduction to many-to-many relationships. :ref:`self_referential_many_to_many` - Specifics on using many-to-many in a self-referential case. :ref:`declarative_many_to_many` - Additional options when using Declarative. :ref:`association_pattern` - an alternative to :paramref:`_orm.relationship.secondary` when composing association table relationships, allowing additional attributes to be specified on the association table. :ref:`composite_secondary_join` - a lesser-used pattern which in some cases can enable complex :func:`_orm.relationship` SQL conditions to be used. .. versionadded:: 0.9.2 :paramref:`_orm.relationship.secondary` works more effectively when referring to a :class:`_expression.Join` instance. :param active_history=False: When ``True``, indicates that the "previous" value for a many-to-one reference should be loaded when replaced, if not already loaded. Normally, history tracking logic for simple many-to-ones only needs to be aware of the "new" value in order to perform a flush. This flag is available for applications that make use of :func:`.attributes.get_history` which also need to know the "previous" value of the attribute. :param backref: Indicates the string name of a property to be placed on the related mapper's class that will handle this relationship in the other direction. The other property will be created automatically when the mappers are configured. Can also be passed as a :func:`.backref` object to control the configuration of the new relationship. .. seealso:: :ref:`relationships_backref` - Introductory documentation and examples. :paramref:`_orm.relationship.back_populates` - alternative form of backref specification. :func:`.backref` - allows control over :func:`_orm.relationship` configuration when using :paramref:`_orm.relationship.backref`. :param back_populates: Takes a string name and has the same meaning as :paramref:`_orm.relationship.backref`, except the complementing property is **not** created automatically, and instead must be configured explicitly on the other mapper. The complementing property should also indicate :paramref:`_orm.relationship.back_populates` to this relationship to ensure proper functioning. .. seealso:: :ref:`relationships_backref` - Introductory documentation and examples. :paramref:`_orm.relationship.backref` - alternative form of backref specification. :param bake_queries=True: Use the :class:`.BakedQuery` cache to cache the construction of SQL used in lazy loads. True by default. Set to False if the join condition of the relationship has unusual features that might not respond well to statement caching. .. versionchanged:: 1.2 "Baked" loading is the default implementation for the "select", a.k.a. "lazy" loading strategy for relationships. .. versionadded:: 1.0.0 .. seealso:: :ref:`baked_toplevel` :param cascade: A comma-separated list of cascade rules which determines how Session operations should be "cascaded" from parent to child. This defaults to ``False``, which means the default cascade should be used - this default cascade is ``"save-update, merge"``. The available cascades are ``save-update``, ``merge``, ``expunge``, ``delete``, ``delete-orphan``, and ``refresh-expire``. An additional option, ``all`` indicates shorthand for ``"save-update, merge, refresh-expire, expunge, delete"``, and is often used as in ``"all, delete-orphan"`` to indicate that related objects should follow along with the parent object in all cases, and be deleted when de-associated. .. seealso:: :ref:`unitofwork_cascades` - Full detail on each of the available cascade options. :ref:`tutorial_delete_cascade` - Tutorial example describing a delete cascade. :param cascade_backrefs=True: A boolean value indicating if the ``save-update`` cascade should operate along an assignment event intercepted by a backref. When set to ``False``, the attribute managed by this relationship will not cascade an incoming transient object into the session of a persistent parent, if the event is received via backref. .. seealso:: :ref:`backref_cascade` - Full discussion and examples on how the :paramref:`_orm.relationship.cascade_backrefs` option is used. :param collection_class: A class or callable that returns a new list-holding object. will be used in place of a plain list for storing elements. .. seealso:: :ref:`custom_collections` - Introductory documentation and examples. :param comparator_factory: A class which extends :class:`.RelationshipProperty.Comparator` which provides custom SQL clause generation for comparison operations. .. seealso:: :class:`.PropComparator` - some detail on redefining comparators at this level. :ref:`custom_comparators` - Brief intro to this feature. :param distinct_target_key=None: Indicate if a "subquery" eager load should apply the DISTINCT keyword to the innermost SELECT statement. When left as ``None``, the DISTINCT keyword will be applied in those cases when the target columns do not comprise the full primary key of the target table. When set to ``True``, the DISTINCT keyword is applied to the innermost SELECT unconditionally. It may be desirable to set this flag to False when the DISTINCT is reducing performance of the innermost subquery beyond that of what duplicate innermost rows may be causing. .. versionchanged:: 0.9.0 - :paramref:`_orm.relationship.distinct_target_key` now defaults to ``None``, so that the feature enables itself automatically for those cases where the innermost query targets a non-unique key. .. seealso:: :ref:`loading_toplevel` - includes an introduction to subquery eager loading. :param doc: Docstring which will be applied to the resulting descriptor. :param extension: an :class:`.AttributeExtension` instance, or list of extensions, which will be prepended to the list of attribute listeners for the resulting descriptor placed on the class. :param foreign_keys: A list of columns which are to be used as "foreign key" columns, or columns which refer to the value in a remote column, within the context of this :func:`_orm.relationship` object's :paramref:`_orm.relationship.primaryjoin` condition. That is, if the :paramref:`_orm.relationship.primaryjoin` condition of this :func:`_orm.relationship` is ``a.id == b.a_id``, and the values in ``b.a_id`` are required to be present in ``a.id``, then the "foreign key" column of this :func:`_orm.relationship` is ``b.a_id``. In normal cases, the :paramref:`_orm.relationship.foreign_keys` parameter is **not required.** :func:`_orm.relationship` will automatically determine which columns in the :paramref:`_orm.relationship.primaryjoin` condition are to be considered "foreign key" columns based on those :class:`_schema.Column` objects that specify :class:`_schema.ForeignKey`, or are otherwise listed as referencing columns in a :class:`_schema.ForeignKeyConstraint` construct. :paramref:`_orm.relationship.foreign_keys` is only needed when: 1. There is more than one way to construct a join from the local table to the remote table, as there are multiple foreign key references present. Setting ``foreign_keys`` will limit the :func:`_orm.relationship` to consider just those columns specified here as "foreign". 2. The :class:`_schema.Table` being mapped does not actually have :class:`_schema.ForeignKey` or :class:`_schema.ForeignKeyConstraint` constructs present, often because the table was reflected from a database that does not support foreign key reflection (MySQL MyISAM). 3. The :paramref:`_orm.relationship.primaryjoin` argument is used to construct a non-standard join condition, which makes use of columns or expressions that do not normally refer to their "parent" column, such as a join condition expressed by a complex comparison using a SQL function. The :func:`_orm.relationship` construct will raise informative error messages that suggest the use of the :paramref:`_orm.relationship.foreign_keys` parameter when presented with an ambiguous condition. In typical cases, if :func:`_orm.relationship` doesn't raise any exceptions, the :paramref:`_orm.relationship.foreign_keys` parameter is usually not needed. :paramref:`_orm.relationship.foreign_keys` may also be passed as a callable function which is evaluated at mapper initialization time, and may be passed as a Python-evaluable string when using Declarative. .. warning:: When passed as a Python-evaluable string, the argument is interpreted using Python's ``eval()`` function. **DO NOT PASS UNTRUSTED INPUT TO THIS STRING**. See :ref:`declarative_relationship_eval` for details on declarative evaluation of :func:`_orm.relationship` arguments. .. seealso:: :ref:`relationship_foreign_keys` :ref:`relationship_custom_foreign` :func:`.foreign` - allows direct annotation of the "foreign" columns within a :paramref:`_orm.relationship.primaryjoin` condition. :param info: Optional data dictionary which will be populated into the :attr:`.MapperProperty.info` attribute of this object. :param innerjoin=False: When ``True``, joined eager loads will use an inner join to join against related tables instead of an outer join. The purpose of this option is generally one of performance, as inner joins generally perform better than outer joins. This flag can be set to ``True`` when the relationship references an object via many-to-one using local foreign keys that are not nullable, or when the reference is one-to-one or a collection that is guaranteed to have one or at least one entry. The option supports the same "nested" and "unnested" options as that of :paramref:`_orm.joinedload.innerjoin`. See that flag for details on nested / unnested behaviors. .. seealso:: :paramref:`_orm.joinedload.innerjoin` - the option as specified by loader option, including detail on nesting behavior. :ref:`what_kind_of_loading` - Discussion of some details of various loader options. :param join_depth: When non-``None``, an integer value indicating how many levels deep "eager" loaders should join on a self-referring or cyclical relationship. The number counts how many times the same Mapper shall be present in the loading condition along a particular join branch. When left at its default of ``None``, eager loaders will stop chaining when they encounter a the same target mapper which is already higher up in the chain. This option applies both to joined- and subquery- eager loaders. .. seealso:: :ref:`self_referential_eager_loading` - Introductory documentation and examples. :param lazy='select': specifies How the related items should be loaded. Default value is ``select``. Values include: * ``select`` - items should be loaded lazily when the property is first accessed, using a separate SELECT statement, or identity map fetch for simple many-to-one references. * ``immediate`` - items should be loaded as the parents are loaded, using a separate SELECT statement, or identity map fetch for simple many-to-one references. * ``joined`` - items should be loaded "eagerly" in the same query as that of the parent, using a JOIN or LEFT OUTER JOIN. Whether the join is "outer" or not is determined by the :paramref:`_orm.relationship.innerjoin` parameter. * ``subquery`` - items should be loaded "eagerly" as the parents are loaded, using one additional SQL statement, which issues a JOIN to a subquery of the original statement, for each collection requested. * ``selectin`` - items should be loaded "eagerly" as the parents are loaded, using one or more additional SQL statements, which issues a JOIN to the immediate parent object, specifying primary key identifiers using an IN clause. .. versionadded:: 1.2 * ``noload`` - no loading should occur at any time. This is to support "write-only" attributes, or attributes which are populated in some manner specific to the application. * ``raise`` - lazy loading is disallowed; accessing the attribute, if its value were not already loaded via eager loading, will raise an :exc:`~sqlalchemy.exc.InvalidRequestError`. This strategy can be used when objects are to be detached from their attached :class:`.Session` after they are loaded. .. versionadded:: 1.1 * ``raise_on_sql`` - lazy loading that emits SQL is disallowed; accessing the attribute, if its value were not already loaded via eager loading, will raise an :exc:`~sqlalchemy.exc.InvalidRequestError`, **if the lazy load needs to emit SQL**. If the lazy load can pull the related value from the identity map or determine that it should be None, the value is loaded. This strategy can be used when objects will remain associated with the attached :class:`.Session`, however additional SELECT statements should be blocked. .. versionadded:: 1.1 * ``dynamic`` - the attribute will return a pre-configured :class:`_query.Query` object for all read operations, onto which further filtering operations can be applied before iterating the results. See the section :ref:`dynamic_relationship` for more details. * True - a synonym for 'select' * False - a synonym for 'joined' * None - a synonym for 'noload' .. seealso:: :doc:`/orm/loading_relationships` - Full documentation on relationship loader configuration. :ref:`dynamic_relationship` - detail on the ``dynamic`` option. :ref:`collections_noload_raiseload` - notes on "noload" and "raise" :param load_on_pending=False: Indicates loading behavior for transient or pending parent objects. When set to ``True``, causes the lazy-loader to issue a query for a parent object that is not persistent, meaning it has never been flushed. This may take effect for a pending object when autoflush is disabled, or for a transient object that has been "attached" to a :class:`.Session` but is not part of its pending collection. The :paramref:`_orm.relationship.load_on_pending` flag does not improve behavior when the ORM is used normally - object references should be constructed at the object level, not at the foreign key level, so that they are present in an ordinary way before a flush proceeds. This flag is not not intended for general use. .. seealso:: :meth:`.Session.enable_relationship_loading` - this method establishes "load on pending" behavior for the whole object, and also allows loading on objects that remain transient or detached. :param order_by: Indicates the ordering that should be applied when loading these items. :paramref:`_orm.relationship.order_by` is expected to refer to one of the :class:`_schema.Column` objects to which the target class is mapped, or the attribute itself bound to the target class which refers to the column. :paramref:`_orm.relationship.order_by` may also be passed as a callable function which is evaluated at mapper initialization time, and may be passed as a Python-evaluable string when using Declarative. .. warning:: When passed as a Python-evaluable string, the argument is interpreted using Python's ``eval()`` function. **DO NOT PASS UNTRUSTED INPUT TO THIS STRING**. See :ref:`declarative_relationship_eval` for details on declarative evaluation of :func:`_orm.relationship` arguments. :param passive_deletes=False: Indicates loading behavior during delete operations. A value of True indicates that unloaded child items should not be loaded during a delete operation on the parent. Normally, when a parent item is deleted, all child items are loaded so that they can either be marked as deleted, or have their foreign key to the parent set to NULL. Marking this flag as True usually implies an ON DELETE rule is in place which will handle updating/deleting child rows on the database side. Additionally, setting the flag to the string value 'all' will disable the "nulling out" of the child foreign keys, when the parent object is deleted and there is no delete or delete-orphan cascade enabled. This is typically used when a triggering or error raise scenario is in place on the database side. Note that the foreign key attributes on in-session child objects will not be changed after a flush occurs so this is a very special use-case setting. Additionally, the "nulling out" will still occur if the child object is de-associated with the parent. .. seealso:: :ref:`passive_deletes` - Introductory documentation and examples. :param passive_updates=True: Indicates the persistence behavior to take when a referenced primary key value changes in place, indicating that the referencing foreign key columns will also need their value changed. When True, it is assumed that ``ON UPDATE CASCADE`` is configured on the foreign key in the database, and that the database will handle propagation of an UPDATE from a source column to dependent rows. When False, the SQLAlchemy :func:`_orm.relationship` construct will attempt to emit its own UPDATE statements to modify related targets. However note that SQLAlchemy **cannot** emit an UPDATE for more than one level of cascade. Also, setting this flag to False is not compatible in the case where the database is in fact enforcing referential integrity, unless those constraints are explicitly "deferred", if the target backend supports it. It is highly advised that an application which is employing mutable primary keys keeps ``passive_updates`` set to True, and instead uses the referential integrity features of the database itself in order to handle the change efficiently and fully. .. seealso:: :ref:`passive_updates` - Introductory documentation and examples. :paramref:`.mapper.passive_updates` - a similar flag which takes effect for joined-table inheritance mappings. :param post_update: This indicates that the relationship should be handled by a second UPDATE statement after an INSERT or before a DELETE. Currently, it also will issue an UPDATE after the instance was UPDATEd as well, although this technically should be improved. This flag is used to handle saving bi-directional dependencies between two individual rows (i.e. each row references the other), where it would otherwise be impossible to INSERT or DELETE both rows fully since one row exists before the other. Use this flag when a particular mapping arrangement will incur two rows that are dependent on each other, such as a table that has a one-to-many relationship to a set of child rows, and also has a column that references a single child row within that list (i.e. both tables contain a foreign key to each other). If a flush operation returns an error that a "cyclical dependency" was detected, this is a cue that you might want to use :paramref:`_orm.relationship.post_update` to "break" the cycle. .. seealso:: :ref:`post_update` - Introductory documentation and examples. :param primaryjoin: A SQL expression that will be used as the primary join of the child object against the parent object, or in a many-to-many relationship the join of the parent object to the association table. By default, this value is computed based on the foreign key relationships of the parent and child tables (or association table). :paramref:`_orm.relationship.primaryjoin` may also be passed as a callable function which is evaluated at mapper initialization time, and may be passed as a Python-evaluable string when using Declarative. .. warning:: When passed as a Python-evaluable string, the argument is interpreted using Python's ``eval()`` function. **DO NOT PASS UNTRUSTED INPUT TO THIS STRING**. See :ref:`declarative_relationship_eval` for details on declarative evaluation of :func:`_orm.relationship` arguments. .. seealso:: :ref:`relationship_primaryjoin` :param remote_side: Used for self-referential relationships, indicates the column or list of columns that form the "remote side" of the relationship. :paramref:`_orm.relationship.remote_side` may also be passed as a callable function which is evaluated at mapper initialization time, and may be passed as a Python-evaluable string when using Declarative. .. warning:: When passed as a Python-evaluable string, the argument is interpreted using Python's ``eval()`` function. **DO NOT PASS UNTRUSTED INPUT TO THIS STRING**. See :ref:`declarative_relationship_eval` for details on declarative evaluation of :func:`_orm.relationship` arguments. .. seealso:: :ref:`self_referential` - in-depth explanation of how :paramref:`_orm.relationship.remote_side` is used to configure self-referential relationships. :func:`.remote` - an annotation function that accomplishes the same purpose as :paramref:`_orm.relationship.remote_side`, typically when a custom :paramref:`_orm.relationship.primaryjoin` condition is used. :param query_class: A :class:`_query.Query` subclass that will be used as the base of the "appender query" returned by a "dynamic" relationship, that is, a relationship that specifies ``lazy="dynamic"`` or was otherwise constructed using the :func:`_orm.dynamic_loader` function. .. seealso:: :ref:`dynamic_relationship` - Introduction to "dynamic" relationship loaders. :param secondaryjoin: A SQL expression that will be used as the join of an association table to the child object. By default, this value is computed based on the foreign key relationships of the association and child tables. :paramref:`_orm.relationship.secondaryjoin` may also be passed as a callable function which is evaluated at mapper initialization time, and may be passed as a Python-evaluable string when using Declarative. .. warning:: When passed as a Python-evaluable string, the argument is interpreted using Python's ``eval()`` function. **DO NOT PASS UNTRUSTED INPUT TO THIS STRING**. See :ref:`declarative_relationship_eval` for details on declarative evaluation of :func:`_orm.relationship` arguments. .. seealso:: :ref:`relationship_primaryjoin` :param single_parent: When True, installs a validator which will prevent objects from being associated with more than one parent at a time. This is used for many-to-one or many-to-many relationships that should be treated either as one-to-one or one-to-many. Its usage is optional, except for :func:`_orm.relationship` constructs which are many-to-one or many-to-many and also specify the ``delete-orphan`` cascade option. The :func:`_orm.relationship` construct itself will raise an error instructing when this option is required. .. seealso:: :ref:`unitofwork_cascades` - includes detail on when the :paramref:`_orm.relationship.single_parent` flag may be appropriate. :param uselist: A boolean that indicates if this property should be loaded as a list or a scalar. In most cases, this value is determined automatically by :func:`_orm.relationship` at mapper configuration time, based on the type and direction of the relationship - one to many forms a list, many to one forms a scalar, many to many is a list. If a scalar is desired where normally a list would be present, such as a bi-directional one-to-one relationship, set :paramref:`_orm.relationship.uselist` to False. The :paramref:`_orm.relationship.uselist` flag is also available on an existing :func:`_orm.relationship` construct as a read-only attribute, which can be used to determine if this :func:`_orm.relationship` deals with collections or scalar attributes:: >>> User.addresses.property.uselist True .. seealso:: :ref:`relationships_one_to_one` - Introduction to the "one to one" relationship pattern, which is typically when the :paramref:`_orm.relationship.uselist` flag is needed. :param viewonly=False: When set to ``True``, the relationship is used only for loading objects, and not for any persistence operation. A :func:`_orm.relationship` which specifies :paramref:`_orm.relationship.viewonly` can work with a wider range of SQL operations within the :paramref:`_orm.relationship.primaryjoin` condition, including operations that feature the use of a variety of comparison operators as well as SQL functions such as :func:`_expression.cast`. The :paramref:`_orm.relationship.viewonly` flag is also of general use when defining any kind of :func:`_orm.relationship` that doesn't represent the full set of related objects, to prevent modifications of the collection from resulting in persistence operations. When using the :paramref:`_orm.relationship.viewonly` flag in conjunction with backrefs, the :paramref:`_orm.relationship.sync_backref` should be set to False; this indicates that the backref should not actually populate this relationship with data when changes occur on the other side; as this is a viewonly relationship, it cannot accommodate changes in state correctly as these will not be persisted. .. versionadded:: 1.3.17 - the :paramref:`_orm.relationship.sync_backref` flag set to False is required when using viewonly in conjunction with backrefs. A warning is emitted when this flag is not set. .. seealso:: :paramref:`_orm.relationship.sync_backref` :param sync_backref: A boolean that enables the events used to synchronize the in-Python attributes when this relationship is target of either :paramref:`_orm.relationship.backref` or :paramref:`_orm.relationship.back_populates`. Defaults to ``None``, which indicates that an automatic value should be selected based on the value of the :paramref:`_orm.relationship.viewonly` flag. When left at its default, changes in state for writable relationships will be back-populated normally. For viewonly relationships, a warning is emitted unless the flag is set to ``False``. .. versionadded:: 1.3.17 .. seealso:: :paramref:`_orm.relationship.viewonly` :param omit_join: Allows manual control over the "selectin" automatic join optimization. Set to ``False`` to disable the "omit join" feature added in SQLAlchemy 1.3; or leave as ``None`` to leave automatic optimization in place. .. note:: This flag may only be set to ``False``. It is not necessary to set it to ``True`` as the "omit_join" optimization is automatically detected; if it is not detected, then the optimization is not supported. .. versionchanged:: 1.3.11 setting ``omit_join`` to True will now emit a warning as this was not the intended use of this flag. .. versionadded:: 1.3 Nr3z-sync_backref and viewonly cannot both be Truezæsetting omit_join to True is not supported; selectin loading of this relationship may not work correctly if this flag is set explicitly. omit_join optimization is automatically detected for conditions under which it is supported.ÚlazyFzsave-update, merge)ÚwarnzCbackref and back_populates keyword arguments are mutually exclusive)2Úsuperr1Ú__init__ÚuselistÚargumentÚ secondaryÚ primaryjoinÚ secondaryjoinÚ post_updateÚ directionÚviewonlyÚ _warn_for_persistence_only_flagsÚsa_excÚ ArgumentErrorÚ sync_backrefr<Ú single_parentÚ_user_defined_foreign_keysÚcollection_classr4r8r5Ú remote_sider6Ú query_classÚ innerjoinÚdistinct_target_keyÚdocr7Ú join_depthrr=Ú omit_joinÚlocal_remote_pairsr9Ú bake_queriesÚload_on_pendingÚ ComparatorÚcomparator_factoryÚ comparatorÚset_creation_orderÚinfoÚ strategy_keyÚsetÚ_reverse_propertyÚcascadeÚ _set_cascadeÚorder_byÚback_populatesÚbackref)$ÚselfrArBrCrDÚ foreign_keysr@rcrerdrErar9rGr<rNr4r5rOr6rTrZrLrQrRrSr7r8rXrWÚ_local_remote_pairsrPr]rUrKÚ __class__s$ €r+r?zRelationshipProperty.__init__usmø€õp Õ" DÑ)Ô)×2Ò2Ñ4Ô4Ð4àˆŒ Ø ˆŒ Ø"ˆŒØ&ˆÔØ*ˆÔØ&ˆÔ؈ŒØ ˆŒ Ø ð Ø × 1Ò 1Ø /Ø /Ø"3Ø-Ø!1ð 2ñ ô ð ð ð ˜ ð ÝÔ&Ø?ñôð ð)ˆÔ؈Œ Ø*ˆÔØ*6ˆÔ'Ø 0ˆÔØ.ˆÔØ 0ˆÔØ.ˆÔØ&ˆÔØ!2ˆÔØ&ˆÔØ"ˆŒØ#6ˆÔ ؈ŒØ,ˆÔØ$ˆŒØ ð Ý ŒIðñ ô ð ð#ˆŒØ"5ˆÔØ"ˆŒØ(ˆÔØ.ˆÔà Ð AÕ"6Ô"Að Ôð×1Ò1°$¸Ñ=Ô=ˆŒÝ Ô Ñ%Ô%Ð%à Р؈DŒIà$ d¤iÐ0Ð2ˆÔå!$¡¤ˆÔà ˜%Ð Ð Ø"ˆDŒLˆLà × Ò Ð2¸Ð Ñ ?Ô ?Ð ?à ˆŒ à,ˆÔà Ô ð #Øð ÝÔ*ð-ñôðð ˆDŒLˆLˆLà"ˆDŒLˆLˆLr,c óŒ—| ¦«D].\}}||j|krtjd|›d�¦«Œ/dS)NzSetting zÌ on relationship() while also setting viewonly=True does not make sense, as a viewonly=True relationship does not perform persistence operations. This configuration may raise an error in a future release.)ÚitemsÚ_persistence_onlyrr=)rfÚkwÚkÚvs r+rHz5RelationshipProperty._warn_for_persistence_only_flags!sa€Ø—H’H‘J”Jð ð ‰DˆAˆqØ�DÔ*¨1Ô-Ò-Ð-õ” � ð /0¨a¨að 2ñôðøð ð r,có~—tj|j|j| ||¦«||j¬¦«dS)N)r[Ú parententityrS)rÚregister_descriptorÚclass_ÚkeyrZrS©rfrs r+Úinstrument_classz%RelationshipProperty.instrument_class3sK€ÝÔ&Ø ŒMØ ŒHØ×.Ò.¨t°VÑ<Ô<ØØ”ð  ñ ô ð ð ð r,cóò—eZdZdZdZ dd„Zd„Zejd„¦«Z ejd„¦«Z ejd„¦«Z d„Z d „Z d „Zd „ZdZd „Zdd „Zdd„Zdd„Zd„Zd„Zd„Zejd„¦«ZdS)úRelationshipProperty.ComparatoraØProduce boolean, comparison, and other operators for :class:`.RelationshipProperty` attributes. See the documentation for :class:`.PropComparator` for a brief overview of ORM level operator definition. .. seealso:: :class:`.PropComparator` :class:`.ColumnProperty.Comparator` :class:`.ColumnOperators` :ref:`types_operators` :attr:`.TypeEngine.comparator_factory` NcóF—||_||_||_|r ||_dSdS)z�Construction of :class:`.RelationshipProperty.Comparator` is internal to the ORM's attribute mechanics. N)ÚpropÚ _parententityÚ_adapt_to_entityÚ_of_type)rfrzÚ parentmapperÚadapt_to_entityÚof_types r+r?z(RelationshipProperty.Comparator.__init__Ss8€ðˆDŒIØ!-ˆDÔ Ø$3ˆDÔ !Øð (Ø '�” � � ð (ð (r,cóR—| |j|j||j¬¦«S)N©rr€)riÚpropertyr{r})rfrs r+rz/RelationshipProperty.Comparator.adapt_to_entity`s0€Ø—>’>Ø” ØÔ"Ø /Øœ ð "ñôð r,có—|jjS)a+The target entity referred to by this :class:`.RelationshipProperty.Comparator`. This is either a :class:`_orm.Mapper` or :class:`.AliasedInsp` object. This is the "target" or "remote" side of the :func:`_orm.relationship`. )rƒÚentity©rfs r+r…z&RelationshipProperty.Comparator.entityhs€ð”=Ô'Ð 'r,có—|jjS)zÙThe target :class:`_orm.Mapper` referred to by this :class:`.RelationshipProperty.Comparator`. This is the "target" or "remote" side of the :func:`_orm.relationship`. )rƒrr†s r+rz&RelationshipProperty.Comparator.mappervs€ð”=Ô'Ð 'r,có—|jjS©N)rƒÚparentr†s r+r{z-RelationshipProperty.Comparator._parententity�s €à”=Ô'Ð 'r,cóJ—|jr |jjS|jjjSr‰)r|Ú selectablerƒrŠÚ_with_polymorphic_selectabler†s r+Ú_source_selectablez2RelationshipProperty.Comparator._source_selectable…s(€ØÔ$ð IØÔ,Ô7Ð7à”}Ô+ÔHÐHr,cóÌ—| ¦«}|jrt|j¦«j}nd}|j |d|d¬¦«\}}}}}}|�||zS|S)NT)Úsource_selectableÚsource_polymorphicÚof_type_mapperÚalias_secondary)rŽr}rrrƒÚ _create_joins) rfÚ adapt_fromr’ÚpjÚsjÚsourceÚdestrBÚtarget_adapters r+Ú__clause_element__z2RelationshipProperty.Comparator.__clause_element__‹sŠ€Ø×0Ò0Ñ2Ô2ˆJØŒ}ð &Ý!(¨¬Ñ!7Ô!7Ô!>��à!%�ð” ×+Ò+Ø",Ø#'Ø-Ø $ð ,ñôñ ØØØØØØðˆ~ؘB‘w�à� r,có\—t |j|j|j|¬¦«S)z‡Redefine this object in terms of a polymorphic subclass. See :meth:`.PropComparator.of_type` for an example. r‚)r1rYrƒr{r|)rfÚclss r+r€z'RelationshipProperty.Comparator.of_type¤s5€õ (×2Ò2Ø” ØÔ"Ø $Ô 5Øð 3ñôð r,có —td¦«‚)z…Produce an IN clause - this is not implemented for :func:`_orm.relationship`-based attributes at this time. zvin_() not yet supported for relationships. For a simple many-to-one, use in_() against the set of foreign key values.)ÚNotImplementedError©rfÚothers r+Úin_z#RelationshipProperty.Comparator.in_±s€õ &ð1ñôð r,có¤—t|tjtjf¦«r]|jjttfvr|  ¦«St|j  d|j ¬¦«¦«S|jj rtjd¦«‚t|j  ||j ¬¦«¦«S)a­Implement the ``==`` operator. In a many-to-one context, such as:: MyClass.some_prop == this will typically produce a clause such as:: mytable.related_id == Where ```` is the primary key of the given object. The ``==`` operator provides partial functionality for non- many-to-one comparisons: * Comparisons against collections are not supported. Use :meth:`~.RelationshipProperty.Comparator.contains`. * Compared to a scalar one-to-many, will produce a clause that compares the target columns in the parent to the given target. * Compared to a scalar many-to-many, an alias of the association table will be rendered as well, forming a natural join that is part of the main body of the query. This will not work for queries that go beyond simple AND conjunctions of comparisons, such as those which use OR. Use explicit joins, outerjoins, or :meth:`~.RelationshipProperty.Comparator.has` for more comprehensive non-many-to-one scalar membership tests. * Comparisons against ``None`` given in a one-to-many or many-to-many context produce a NOT EXISTS clause. N©Ú adapt_sourceú]Can't compare a collection to an object or collection; use contains() to test for membership.)Ú isinstancerÚNoneTyperÚNullrƒrFr r Ú_criterion_existsrÚ_optimized_compareÚadapterr@rIÚInvalidRequestErrorr s r+Ú__eq__z&RelationshipProperty.Comparator.__eq__¿sÛ€õJ˜%¥$¤-µ´Ð!AÑBÔBð Ø”=Ô*­y½*Ð.EÐEÐEØ ×2Ò2Ñ4Ô4Ð4Ð4å(Øœ ×8Ò8Ø ¨t¬|ð9ñôñôðð ”Ô&ð ÝÔ0ð=ñôðõ %Ø”M×4Ò4بD¬Lð5ñôñôðr,c ó¦—t|dd¦«r_t|j¦«}|j|j|j}}}|jjr|s| ¦«}|j }|� |�||z}n|}nd}d}|j r|  ¦«}nd}|j  d||¬¦«\} } } } } }|D]5}t|jjj |¦«||k}|€|}Œ0||z}Œ6| �t| ¦«| z}nt| |jj¬¦«}|�|r|s| |¦«}|�| ddi¦«}|t$j |¦«z}| �/t%jdg|| | g¬¦« | | ¦«}n+t%jdg|| ¬¦« | ¦«}|S) Nr}FT)Údest_polymorphicÚdest_selectabler�)ÚexcludeÚno_replacement_traverser)Úfrom_obj)Úgetattrrr}rrŒÚis_aliased_classrƒÚ_is_self_referentialÚaliasÚ_single_table_criterionr¬rŽr”rsrrOÚtraverseÚ _annotaterÚTrue_Ú_ifnoneÚexistsÚcorrelate_except)rfÚ criterionÚkwargsr]Ú target_mapperÚ to_selectabler¶Ú single_critr�r–r—r˜r™rBršrnÚcritÚjÚexs r+rªz1RelationshipProperty.Comparator._criterion_existsùsU€Ý�t˜Z¨Ñ.Ô.ð %ݘtœ}Ñ-Ô-�à”KØ”OØÔ)ð/?˜}� ð ”=Ô5ð:Ð>Nð:Ø$1×$7Ò$7Ñ$9Ô$9�Mà+ÔC� ØÐ*Ø Ð,Ø$/°)Ñ$;˜ ˜ à$/˜ øà#(Ð Ø $� àŒ|ð )Ø$(×$;Ò$;Ñ$=Ô$=Ð!Ð!à$(Ð!ð” ×+Ò+Ø!%Ø -Ø"3ð,ñôñ ØØØØØØðð 1ð 1�ݘtœ}Ô3Ô:¸AÑ>Ô>À&ÈÄ)ÒK�ØÐ$Ø $�I�Ià )¨DÑ 0�I�Ið ˆ~Ý! "Ñ%Ô%¨Ñ*��å! "¨d¬mÔ.GÐHÑHÔH�ðÐ%Ø"ð&à(ð&ð +×3Ò3°IÑ>Ô>� ðÐ$Ø%×/Ò/Ø.°Ð5ñô� ð•s”y×(Ò(¨Ñ3Ô3Ñ3ˆDàÐ$Ý”ZØ�C˜¨¨yÐ(9ðñôç"Ò" 4¨Ñ3Ô3ð�õ”Z   T°DÐ9Ñ9Ô9×JÒJØñô�ðˆIr,c ó^—|jjstjd¦«‚|j|fi|¤ŽS)aqProduce an expression that tests a collection against particular criterion, using EXISTS. An expression like:: session.query(MyClass).filter( MyClass.somereference.any(SomeRelated.x==2) ) Will produce a query like:: SELECT * FROM my_table WHERE EXISTS (SELECT 1 FROM related WHERE related.my_id=my_table.id AND related.x=2) Because :meth:`~.RelationshipProperty.Comparator.any` uses a correlated subquery, its performance is not nearly as good when compared against large target tables as that of using a join. :meth:`~.RelationshipProperty.Comparator.any` is particularly useful for testing for empty collections:: session.query(MyClass).filter( ~MyClass.somereference.any() ) will produce:: SELECT * FROM my_table WHERE NOT EXISTS (SELECT 1 FROM related WHERE related.my_id=my_table.id) :meth:`~.RelationshipProperty.Comparator.any` is only valid for collections, i.e. a :func:`_orm.relationship` that has ``uselist=True``. For scalar references, use :meth:`~.RelationshipProperty.Comparator.has`. z9'any()' not implemented for scalar attributes. Use has().©rƒr@rIr­rª©rfrÀrÁs r+Úanyz#RelationshipProperty.Comparator.anyMsI€ðR”=Ô(ð ÝÔ0ð-ñôðð *�4Ô)¨)Ð>Ð>°vÐ>Ð>Ð >r,c ó^—|jjrtjd¦«‚|j|fi|¤ŽS)aæProduce an expression that tests a scalar reference against particular criterion, using EXISTS. An expression like:: session.query(MyClass).filter( MyClass.somereference.has(SomeRelated.x==2) ) Will produce a query like:: SELECT * FROM my_table WHERE EXISTS (SELECT 1 FROM related WHERE related.id==my_table.related_id AND related.x=2) Because :meth:`~.RelationshipProperty.Comparator.has` uses a correlated subquery, its performance is not nearly as good when compared against large target tables as that of using a join. :meth:`~.RelationshipProperty.Comparator.has` is only valid for scalar references, i.e. a :func:`_orm.relationship` that has ``uselist=False``. For collection references, use :meth:`~.RelationshipProperty.Comparator.any`. z4'has()' not implemented for collections. Use any().rÉrÊs r+Úhasz#RelationshipProperty.Comparator.has~sF€ð8Œ}Ô$ð ÝÔ0ØMñôðð*�4Ô)¨)Ð>Ð>°vÐ>Ð>Ð >r,c óÔ—|jjstjd¦«‚|j ||j¬¦«}|jj�| |¦«|_|S)au Return a simple expression that tests a collection for containment of a particular item. :meth:`~.RelationshipProperty.Comparator.contains` is only valid for a collection, i.e. a :func:`_orm.relationship` that implements one-to-many or many-to-many with ``uselist=True``. When used in a simple one-to-many context, an expression like:: MyClass.contains(other) Produces a clause like:: mytable.id == Where ```` is the value of the foreign key attribute on ``other`` which refers to the primary key of its parent object. From this it follows that :meth:`~.RelationshipProperty.Comparator.contains` is very useful when used with simple one-to-many operations. For many-to-many operations, the behavior of :meth:`~.RelationshipProperty.Comparator.contains` has more caveats. The association table will be rendered in the statement, producing an "implicit" join, that is, includes multiple tables in the FROM clause which are equated in the WHERE clause:: query(MyClass).filter(MyClass.contains(other)) Produces a query like:: SELECT * FROM my_table, my_association_table AS my_association_table_1 WHERE my_table.id = my_association_table_1.parent_id AND my_association_table_1.child_id = Where ```` would be the primary key of ``other``. From the above, it is clear that :meth:`~.RelationshipProperty.Comparator.contains` will **not** work with many-to-many collections when used in queries that move beyond simple AND conjunctions, such as multiple :meth:`~.RelationshipProperty.Comparator.contains` expressions joined by OR. In such cases subqueries or explicit "outer joins" will need to be used instead. See :meth:`~.RelationshipProperty.Comparator.any` for a less-performant alternative using EXISTS, or refer to :meth:`_query.Query.outerjoin` as well as :ref:`ormtutorial_joins` for more details on constructing outer joins. z9'contains' not implemented for scalar attributes. Use ==r¤) rƒr@rIr­r«r¬rDÚ'_Comparator__negated_contains_or_equalsÚnegation_clause)rfr¡rÁÚclauses r+Úcontainsz(RelationshipProperty.Comparator.contains s€€ðr”=Ô(ð ÝÔ0ð*ñôðð”]×5Ò5Ø D¤Lð6ñôˆFðŒ}Ô*Ð6Ø)-×)JÒ)JØñ*ô*�Ô&ðˆMr,c 󤇇‡‡—‰jjtkrPtj|¦«Šˆfd„Šˆfd„Љjjr&t jˆˆˆfd„‰jjD¦«ŽSt jd„t‰jj j ‰jj   |¦«¦«D¦«Ž}‰  |¦«S)Nc óŠ•—|j}tj|d‰j ‰jj|||¦«¬¦«S)NT)ÚuniqueÚ callable_)ÚdictrÚ bindparamrƒÚ_get_attr_w_warn_on_noner)ÚxÚstateÚcolÚdict_rfs €r+Ústate_bindparamzURelationshipProperty.Comparator.__negated_contains_or_equals..state_bindparamísLø€Ø!œJ�EÝœ=ØØ#Ø"&¤-×"HÒ"HØ œMÔ0°%¸Àñ#ô#ðñôðr,có@•—‰jr‰ |¦«S|Sr‰)r¬©rÜrfs €r+ÚadaptzKRelationshipProperty.Comparator.__negated_contains_or_equals..adapt÷s$ø€Ø”|ð#Ø#Ÿ|š|¨CÑ0Ô0Ð0à"˜ r,c 󜕗g|]H\}}tj‰|¦«‰‰|¦«‰|¦«k‰|¦«dk¦«‘ŒISr‰)rÚor_)Ú.0rÚÚyrárÛrÞs €€€r+ú zPRelationshipProperty.Comparator.__negated_contains_or_equals..ÿsuø€ðððñ !'  Aõ  œGØ %  a¡¤Ø#2 ?°5°5¸±8´8¸UÀAÑ#FÔ#Fò!Gà %  a¡¤¨DÒ 0ñôðððr,có —g|] \}}||k‘Œ S©rè©rärÚrås r+ræzPRelationshipProperty.Comparator.__negated_contains_or_equals.. s0€ðððᘘAð˜’Fðððr,)rƒrFr rÚinstance_stateÚ_use_getrÚand_rVÚziprÚ primary_keyÚprimary_key_from_instancerª)rfr¡rÀrárÛrÞs` @@@r+Ú__negated_contains_or_equalsz This will typically produce a clause such as:: mytable.related_id != Where ```` is the primary key of the given object. The ``!=`` operator provides partial functionality for non- many-to-one comparisons: * Comparisons against collections are not supported. Use :meth:`~.RelationshipProperty.Comparator.contains` in conjunction with :func:`_expression.not_`. * Compared to a scalar one-to-many, will produce a clause that compares the target columns in the parent to the given target. * Compared to a scalar many-to-many, an alias of the association table will be rendered as well, forming a natural join that is part of the main body of the query. This will not work for queries that go beyond simple AND conjunctions of comparisons, such as those which use OR. Use explicit joins, outerjoins, or :meth:`~.RelationshipProperty.Comparator.has` in conjunction with :func:`_expression.not_` for more comprehensive non-many-to-one scalar membership tests. * Comparisons against ``None`` given in a one-to-many or many-to-many context produce an EXISTS clause. Nr¤r¦)r§rr¨rr©rƒrFr rr«r¬rªr@rIr­rÏr s r+Ú__ne__z&RelationshipProperty.Comparator.__ne__sÀõN˜%¥$¤-µ´Ð!AÑBÔBð OØ”=Ô*­iÒ7Ð7Ý(Øœ×9Ò9Ø ¨t¬|ð:ñôðñôðð ×1Ò1Ñ3Ô3Ð3Ø”Ô&ð OÝÔ0ð9ñôðõ % T×%FÒ%FÀuÑ%MÔ%MÑNÔNÐNr,cón—tjjrtj ¦«|jSr‰)Ú mapperlibÚMapperÚ _new_mappersÚ_configure_allrzr†s r+rƒz(RelationshipProperty.Comparator.propertyOs-€åÔÔ,ð 2ÝÔ ×/Ò/Ñ1Ô1Ð1Ø”9Ð r,)NNr‰)Ú__name__Ú __module__Ú __qualname__Ú__doc__r}r?rrÚmemoized_propertyr…rr{rŽr›r€r¢Ú__hash__r®rªrËrÍrÒrÏròrƒrèr,r+rYrx<sš€€€€€ð ð ð(ˆðEIð (ð (ð (ð (ð ð ð ð Ô ð (ð (ñ Ô ð (ð Ô ð (ð (ñ Ô ð (ð Ô ð (ð (ñ Ô ð (ð Ið Ið Ið  ð ð ð2 ð ð ð ð ð ðˆð8 ð8 ð8 ðtR ðR ðR ðR ðh/ ?ð/ ?ð/ ?ð/ ?ðb ?ð ?ð ?ð ?ðDG ðG ðG ðR* 6ð* 6ð* 6ðX8 Oð8 Oð8 Oðt Ô ð ð ñ Ô ð ð ð r,rYcóˆ—|€J‚d}|�"t|¦«}|jr |jj}| |d||¬¦«S)NT)Úvalue_is_parentr¥r“)rr¶Ú_adapterÚ adapt_clauser«)rfÚinstancer“Ú from_entityr¥Úinsps r+Ú _with_parentz!RelationshipProperty._with_parentUsd€ØÐ#Ð#Ð#؈ Ø Ð "ݘ;Ñ'Ô'ˆDØÔ$ð :Ø#œ}Ô9� Ø×&Ò&Ø Ø Ø%Ø+ð 'ñ ô ð r,c󨇇‡‡ ‡ —‰�R t‰¦«Šn#tj$rdŠYnwxYw‰�t‰dd¦«stjd‰z¦«‚| }‰€‰ ||¬¦«S|s‰jj‰jjc}Šn‰jj ‰jj c}Š|r‰j Š n‰j Š tj‰ ¦«¦«Š ˆˆ ˆ ˆˆfd„}‰j�;|r9t#‰j ¦«¦« |¦«}t)j|id|i¦«}|r ||¦«}|S)NÚ is_instanceFzÃMapped instance expected for relationship comparison to object. Classes, queries and other SQL elements are not accepted in this context; for comparison with a subquery, use %s.has(**criteria).r¤cón•—|j‰vr*‰ ‰‰‰‰|j¦«|_dSdSr‰)Ú_identifying_keyrÙÚcallable)rØÚ bind_to_colrÝrrfrÛs €€€€€r+Úvisit_bindparamz@RelationshipProperty._optimized_compare..visit_bindparam‘sKø€ØÔ)¨[Ð8Ð8Ø%)×%BÒ%BØØØØ  Ô :Ô;ñ &ô&� Ô"Ð"Ð"ð9Ð8r,rØ)rrIÚNoInspectionAvailablerµrJÚ_lazy_none_clauseÚ_lazy_strategyÚ _lazywhereÚ _bind_to_colÚ_rev_lazywhereÚ_rev_bind_to_colrrŠrÚ instance_dictÚobjrBrr¸rºrÚcloned_traverse) rfrÛrÿr¥r“Úreverse_directionrÀr r rÝrs `` @@@r+r«z'RelationshipProperty._optimized_comparecsÔøøøøø€ð Ð ð Ý ™œ��øÝÔ/ð ð ð Ø���ð øøøðˆ}¥G¨E°=À%Ñ$HÔ$Hˆ}ÝÔ*ð.ð15ñ 5ñôðð!0Ð/Ðà ˆ=Ø×)Ò)Ø!° ð*ñôð ð!ð àÔ#Ô.ØÔ#Ô0ð #ˆI�{�{ð Ô#Ô2ØÔ#Ô4ð #ˆI�{ð ð !Ø”[ˆFˆFà”[ˆFåÔ(¨¯ª©¬Ñ5Ô5ˆð ð ð ð ð ð ð ð ð ð Œ>Ð %¨/Ð %Ý% d¤n×&:Ò&:Ñ&<Ô&<Ñ=Ô=×FÒFØñôˆIõÔ,Ø �r˜K¨Ð9ñ ô ˆ ð ð 0Ø$˜  YÑ/Ô/ˆIØÐs ‰™-¬-c󀇇‡‡‡—‰ ‰¦«Š‰ ‰j¦«ˆˆˆˆˆfd„}|S)aKCreate the callable that is used in a many-to-one expression. E.g.:: u1 = s.query(User).get(5) expr = Address.user == u1 Above, the SQL should be "address.user_id = 5". The callable returned by this method produces the value "5" based on the identity of ``u1``. cóì•—‰j‰jx}}|tju}‰ ‰‰‰‰jr tjntjtjz ¬¦«}|tj ur+|s(tj d‰›dt‰¦«›d�¦«‚n;|tj ur+|s(tj d‰›dt‰¦«›d�¦«‚n|}|€tjd‰z¦«|S)N©ÚpassivezCan't resolve value for column z on object z'; no value has been set for this columnz2; the object is detached and the value was expiredz Got None for value of column %s; this is unsupported for a relationship comparison and will not currently produce an IS comparison (but may in a future release))Ú_last_known_valuesrtrÚNO_VALUEÚ_get_state_attr_by_columnÚ persistentÚ PASSIVE_OFFÚPASSIVE_NO_FETCHÚINIT_OKÚ NEVER_SETrIr­r ÚPASSIVE_NO_RESULTrr=) Ú last_knownÚ to_returnÚexisting_is_availableÚ current_valueÚcolumnrÝrrzrÛs €€€€€r+Ú_goz:RelationshipProperty._get_attr_w_warn_on_none.._goÙsJø€Ø%*Ô%=¸d¼hÔ%GÐ GˆJ˜Ø$.µjÔ6IÐ$IÐ !ð #×<Ò<ØØØàÔ#ðF� Ô.Ð.åÔ0µ:Ô3EÑEð =ñôˆMð¥ Ô 4Ð4Ð4Ø,ðÝ Ô4Ð4ð"˜6˜6¥9¨UÑ#3Ô#3Ð#3Ð#3ð5ñôððð ¥*Ô">Ð>Ð>Ø,ðÝ Ô4Ð4ð&, V V­Y°uÑ-=Ô-=Ð-=Ð-=ð?ñôððð*� ØÐ Ý” ð4ð7=ñ=ñôðð Ð r,)Úget_property_by_columnÚ_track_last_known_valuert)rfrrÛrÝr)r*rzs ```` @r+rÙz-RelationshipProperty._get_attr_w_warn_on_none§sjøøøøø€ðV×,Ò,¨VÑ4Ô4ˆð ×%Ò% d¤hÑ/Ô/Ð/ð( ð( ð( ð( ð( ð( ð( ð( ð( ðTˆ r,có¦—|s|jj|jj}}n|jj|jj}}t ||¦«}|r ||¦«}|Sr‰)rrrrrr)rfrr¥rÀr s r+rz&RelationshipProperty._lazy_none_clausesn€Ø ð àÔ#Ô.ØÔ#Ô0ð#ˆIˆIð Ô#Ô2ØÔ#Ô4ð#ˆIõ ,¨I°{ÑCÔCˆ à ð 0Ø$˜  YÑ/Ô/ˆIØÐr,cóT—t|jjj¦«dz|jzS)Nú.)ÚstrrŠrsrørtr†s r+Ú__str__zRelationshipProperty.__str__s$€Ý�4”;Ô%Ô.Ñ/Ô/°#Ñ5¸¼Ñ@Ð@r,c ó.—|r|jD] } || f|vrdSŒ d|jvrdS|j|vrdS|j�rH| |j¦« ||¦«} t | d¦«r| j} |r.| |j¦« ||¦«g} | D]b} tj | ¦«} tj | ¦«}d|| |f<|  | ||||¬¦«}|�|   |¦«Œc|s7tj |||j¦«}| D]}| |¦«ŒdS| |j¦« ||| d¬¦«dS||j} | �Jtj | ¦«} tj | ¦«}d|| |f<|  | ||||¬¦«}nd}|s |||j<dS| |j¦« |||d¦«dS)NÚmergeÚ _sa_adapterT)ÚloadÚ _recursiveÚ_resolve_conflict_mapF)Ú_adapt)r`Ú_cascadertr@Úget_implÚgetÚhasattrr4rrêrÚ_mergeÚappendÚinit_state_collectionÚappend_without_eventr_)rfÚsessionÚ source_stateÚ source_dictÚ dest_stateÚ dest_dictr5r6r7ÚrÚ instancesÚ dest_listÚcurrentÚ current_stateÚ current_dictrÚcollÚcs r+r3zRelationshipProperty.mergesÆ€ð ð ØÔ+ð ð �Ø  !Ð$¨ Ð2Ð2Ø�F�Fð3ð ˜$œ-Ð 'Ð 'Ø ˆFà Œ8˜;Ð &Ð &Ø ˆFà Œ<ñ> Ø$×-Ò-¨d¬hÑ7Ô7×;Ò;ؘkñôˆIõ�y -Ñ0Ô0ð 2à%Ô1� àð Ið ×#Ò# D¤HÑ-Ô-×1Ò1°*¸iÑHÔHÐHàˆIØ$ð *ð *�Ý *Ô 9¸'Ñ BÔ B� Ý)Ô7¸Ñ@Ô@� Ø48� ˜M¨4Ð0Ñ1Ø—n’nØ!Ø ØØ)Ø*?ð %ñô�ð�?Ø×$Ò$ SÑ)Ô)Ð)øàð Ý!Ô7Ø  ¨4¬8ñô�ð#ð1ð1�AØ×-Ò-¨aÑ0Ô0Ð0Ð0ð1ð1ð×#Ò# D¤HÑ-Ô-×1Ò1Ø  ¨9¸Uð2ñôðððð" $¤(Ô+ˆGØÐ"Ý *Ô 9¸'Ñ BÔ B� Ý)Ô7¸Ñ@Ô@� Ø48� ˜M¨4Ð0Ñ1Ø—n’nØ!Ø ØØ)Ø*?ð %ñô��ð�àð Ø&)� ˜$œ(Ñ#Ð#Ð#à×#Ò# D¤HÑ-Ô-×1Ò1Ø  ¨3°ñôðððr,có—|j|j}| |||¬¦«}|tjus|€gSt |d¦«r#d„| ||||¬¦«D¦«Stj|¦«|fgS)z”Return a list of tuples (state, obj) for the given key. returns an empty list if the value is None/empty/PASSIVE_NO_RESULT rNÚget_collectioncó:—g|]}tj|¦«|f‘ŒSrè)rrê)räÚos r+ræz;RelationshipProperty._value_as_iterable..s8€ðððàõÔ*¨1Ñ-Ô-¨qÐ1ðððr,)ÚmanagerÚimplr;rr$r<rOrê)rfrÛrÝrtrrSrÚs r+Ú_value_as_iterablez'RelationshipProperty._value_as_iterableqs§€ðŒ}˜SÔ!Ô&ˆØ �HŠH�U˜E¨7ˆHÑ 3Ô 3ˆØ • Ô,Ð ,Ð ,°° ؈IÝ �TÐ+Ñ ,Ô ,ð 7ððà×,Ò,¨U°E¸1ÀgÐ,ÑNÔNðñôð õ  Ô.¨qÑ1Ô1°1Ð5Ð6Ð 6r,c #ó€K—|dks|jr tj}n tj}|dkr,|j|jj ||¦«}n| |||j|¬¦«}|dkod|j v}|D]³\} } | |vrŒ | €Œ tj | ¦«} |r || ¦«rŒ/|r| jsŒ9| jj } |   |j j j ¦«s-td|j›d|jj›d| j›d �¦«‚| | ¦«| | | | fV—Œ´dS) NÚdeletez save-updaterzrefresh-expireú delete-orphanz Attribute 'z ' on class 'z"' doesn't handle objects of type 'ú')r4rÚPASSIVE_NO_INITIALIZEr rRrtrSÚget_all_pendingrTr9rrÚisaÚ class_managerÚAssertionErrorrŠrsriÚadd) rfÚtype_rÛrÝÚvisited_statesÚhalt_onrÚtuplesÚ skip_pendingrêrMrÚinstance_mappers r+Úcascade_iteratorz%RelationshipProperty.cascade_iterator†s¬èè€ð �HÒ Ð  Ô 4Ð Ý Ô6ˆGˆGå Ô,ˆGà �MÒ !Ð !Ø”] 4¤8Ô,Ô1×AÒAÀ%ÈÑOÔOˆFˆFð×,Ò,Ø�u˜dœh°ð-ñôˆFð Ð%Ò %Ð N¨/ÀÄÐ*Nð ð"(ð Dð DÑ ˆN˜AØ Ð/Ð/Øàˆyð å&Ô4°QÑ7Ô7ˆMàð ˜7˜7 >Ñ2Ô2ð Øàð  NÔ$6ð Øà,Ô4Ô;ˆOà"×&Ò& t¤{Ô'@Ô'GÑHÔHð Ý$�nð”x�x�x ¤Ô!3Ð!3Ð!3°Q´[°[°[ðBñôðð × Ò ˜~Ñ .Ô .Ð .à�_ n°mÐCÐ CÐ CÐ CÐ Cð? Dð Dr,có—|jduS)NF)rKr†s r+Ú_effective_sync_backrefz,RelationshipProperty._effective_sync_backref¾s€àÔ ¨Ð-Ð-r,có°—|jr"|jrtjd|›d|›d�¦«‚|jr#|jdurt jd|||f¦«dSdSdS)Nú Relationship z( cannot specify sync_backref=True since z includes viewonly=True.Fz—Setting backref / back_populates on relationship %s to refer to viewonly relationship %s should include sync_backref=False set on the %s relationship. )rGrKrIr­rÚ warn_limited)Úrel_aÚrel_bs r+Ú_check_sync_backrefz(RelationshipProperty._check_sync_backrefÂsš€à Œ>ð ˜eÔ0ð ÝÔ,Ð,à-2¨U¨U°E°E°Eð;ñôð ð Œ>ð ˜eÔ0¸Ð=Ð=Ý Ô ðBð˜˜uÐ%ñ  ô ð ð ð ð ð Ð=Ð=r,c ó—|j |d¬¦«}| ||¦«| ||¦«|j |¦«|j |¦«|j |j¦«s%tjd|›d|›d|›d|j›�¦«‚|j ttfvr2|j |j kr$tj|›d|›d|j ›d �¦«‚dSdS) NF)Ú_configure_mapperszreverse_property z on relationship z references relationship z", which does not reference mapper z and back-reference z are both of the same direction z<. Did you mean to set remote_side on the many-to-one side ?) rÚ get_propertyrmr`r^Ú common_parentrŠrIrJrFr r )rfrtr¡s r+Ú_add_reverse_propertyz*RelationshipProperty._add_reverse_propertyÑs.€Ø” ×(Ò(¨ÀÐ(ÑGÔGˆð × Ò   uÑ-Ô-Ð-ð × Ò  ¨Ñ-Ô-Ð-à Ô×"Ò" 5Ñ)Ô)Ð)Ø Ô×#Ò# DÑ)Ô)Ð)àŒ|×)Ò)¨$¬+Ñ6Ô6ð ÝÔ&Ð&ð�3�3˜˜˜˜e˜e˜e T¤[ [ð2ñôð ð ŒN�y­)Ð4Ð 4Ð 4Ø” %¤/Ò1Ð1åÔ&ð�5�5˜$˜$˜$ ¤  ð0ñôð ð 5Ð 4Ø1Ð1r,cóØ—tj|j¦«r;t|jtt jf¦«s| ¦«}n|j}t|t¦«rt j|d¬¦«S t|¦«}t|d¦«r|Sn#tj $rYnwxYwtj d|j ›dt |¦«›d�¦«‚)zReturn the target mapped entity, which is an inspect() of the class or aliased class tha is referred towards. F©Ú configurerúrelationship 'z2' expects a class or a mapper argument (received: ú))rr rAr§ÚtyperôrõÚ class_mapperrr<rIr rJrt)rfrAr…s r+r…zRelationshipProperty.entityós€õ Œ=˜œÑ 'Ô 'ð %µ Ø ŒM�D¥)Ô"2Ð3ñ1 ô1 ð %ð—}’}‘”ˆHˆHà”}ˆHå �h¥Ñ %Ô %ð EÝÔ)¨(¸eÐDÑDÔDÐ Dð ݘXÑ&Ô&ˆFõ�v˜xÑ(Ô(ð Ø� ð øõÔ+ð ð ð Ø ˆDð øøøõ Ô"Ð"ðŒxˆxˆx�˜h™œ˜˜ð )ñ ô ð sÂB*Â*B<Â;B<có—|jjS)zšReturn the targeted :class:`_orm.Mapper` for this :class:`.RelationshipProperty`. This is a lazy-initializing static attribute. )r…rr†s r+rzRelationshipProperty.mappers€ðŒ{Ô!Ð!r,c󸕗| ¦«| ¦«| ¦«| |j¦«| ¦«| ¦«|j ¦«tt|¦«  ¦«|  d¦«|_ dS)N))r<r:)Ú_check_conflictsÚ_process_dependent_argumentsÚ_setup_join_conditionsÚ_check_cascade_settingsr9Ú _post_initÚ_generate_backrefÚ_join_conditionÚ"_warn_for_conflicting_sync_targetsr>r1Údo_initÚ _get_strategyr)rfris €r+r„zRelationshipProperty.do_initsÀø€Ø ×ÒÑÔÐØ ×)Ò)Ñ+Ô+Ð+Ø ×#Ò#Ñ%Ô%Ð%Ø ×$Ò$ T¤]Ñ3Ô3Ð3Ø �ŠÑÔÐØ ×ÒÑ Ô Ð Ø Ô×?Ò?ÑAÔAÐAÝ Õ" DÑ)Ô)×1Ò1Ñ3Ô3Ð3Ø"×0Ò0Ð1FÑGÔGˆÔÐÐr,c ó(—dD]N}t||¦«}tj|¦«r(t|¦«st |||¦«¦«ŒOdD]E}t||¦«}|�1t ||t t j||¦«¦«¦«ŒF|j�4t|j¦«r tj d|j›d|›d�¦«‚|j dur/|j �(d„tj |j ¦«D¦«|_ tj d „tj|j¦«D¦«¦«|_tj d „tj|j¦«D¦«¦«|_|jj|_dS) zŠConvert incoming configuration arguments to their proper form. Callables are resolved, ORM annotations removed. )rcrCrDrBrMrO)rCrDNzsecondary argument z passed to to relationship() z± must be a Table object or other FROM clause; can't send a mapped class directly as rows in 'secondary' are persisted independently of a class that is mapped to that same table.Fcó8—g|]}tj|d¦«‘ŒS)rc©rÚ_only_column_elements©rärÚs r+ræzERelationshipProperty._process_dependent_arguments..Us5€ðððàõÔ0°°JÑ?Ô?ðððr,c3ó@K—|]}tj|d¦«V—ŒdS)rgNrˆrŠs r+ú zDRelationshipProperty._process_dependent_arguments..ZsCèè€ð: ð: àõ Ô ,¨Q°Ñ ?Ô ?ð: ð: ð: ð: ð: ð: r,c3ó@K—|]}tj|d¦«V—ŒdS)rONrˆrŠs r+rŒzDRelationshipProperty._process_dependent_arguments.._sCèè€ð+ ð+ àõ Ô ,¨Q° Ñ >Ô >ð+ ð+ ð+ ð+ ð+ ð+ r,)rµrr rÚsetattrrrr‰rBrIrJrcÚto_listÚ column_setÚ to_column_setrMrOr…Úpersist_selectableÚtarget)rfÚattrÚ attr_valueÚvals r+r}z1RelationshipProperty._process_dependent_arguments&sÖ€ð ð 2ð 2ˆDõ!  tÑ,Ô,ˆJÝŒ}˜ZÑ(Ô(ð 2Õ1AÀ*Ñ1MÔ1Mð 2ݘ˜d J J¡L¤LÑ1Ô1Ð1øð3ð ð ˆDݘ$ Ñ%Ô%ˆCØˆÝØØÝ#Ý"Ô8¸¸dÑCÔCñôñôðøð Œ>Ð %Õ*:¸4¼>Ñ*JÔ*JÐ %ÝÔ&Ð&ð *.¬¨¨¸¸¸ð ?ñôð ð Œ= Ð %Ð %¨$¬-Ð*Cðð圠d¤mÑ4Ô4ðñôˆDŒMõ +/¬/ð: ð: åÔ'¨Ô(GÑHÔHð: ñ: ô: ñ+ ô+ ˆÔ'õ  œ?ð+ ð+ åÔ'¨Ô(8Ñ9Ô9ð+ ñ+ ô+ ñ ô ˆÔð ”kÔ4ˆŒ ˆ ˆ r,có4—tdid|jj“d|jj“d|jj“d|jj“d|j“d|j“d|j“d|jj“d |j j“d |j “d |j “d |j “d |j “d|“d|j “d|j“Žx|_}|j|_|j|_|j|_|j |_ |j|_ |j|_|j|_|j|_|j|_dS)NÚparent_persist_selectableÚchild_persist_selectableÚparent_local_selectableÚchild_local_selectablerCrBrDÚparent_equivalentsÚchild_equivalentsÚconsider_as_foreign_keysrVrOÚself_referentialrzÚ support_syncÚcan_be_synced_fnrè)Ú JoinConditionrŠr’r…Ú local_tablerCrBrDÚ_equivalent_columnsrrMrVrOr·rGÚ_columns_are_mappedr‚rFÚremote_columnsÚ local_columnsÚsynchronize_pairsÚforeign_key_columnsÚ_calculated_foreign_keysÚsecondary_synchronize_pairs)rfÚjcs r+r~z+RelationshipProperty._setup_join_conditionsfsŒ€Ý$1ð% ð% ð% Ø&*¤kÔ&DÐ&Dð% à%)¤[Ô%CÐ%Cð% ð%)¤KÔ$;Ð$;ð% ð$(¤;Ô#:Ð#:ð % ð Ô(Ð(ð % ð ”n�nð % ðÔ,Ð,ð% ð $œ{Ô>Ð>ð% ð#œkÔ=Ð=ð% ð&*Ô%DÐ%Dð% ð $Ô6Ð6ð% ðÔ(Ð(ð% ð"Ô6Ð6ð% ð�ð% ð"œ]Ð*Ð*ð% ð "Ô5Ð5ð!% ð ˆÔ˜rð$œ>ˆÔØÔ-ˆÔØœˆŒØ"$Ô"7ˆÔØÔ,ˆÔØÔ-ˆÔØ!#Ô!5ˆÔØ(*Ô(>ˆÔ%Ø+-Ô+IˆÔ(Ð(Ð(r,c ó—|jjrytj|jjd¬¦« |j¦«sCtjd|j›d|jjj ›d|jjj ›d�¦«‚dSdS)zOTest that this relationship is legal, warn about inheritance conflicts.Frtz)Attempting to assign a new relationship 'z$' to a non-primary mapper on class 'zm'. New relationships can only be added to the primary mapper, i.e. the very first mapper created for class 'z' N) rŠÚ non_primaryrôryrsÚ has_propertyrtrIrJrør†s r+r|z%RelationshipProperty._check_conflictsƒs£€ð Œ;Ô "ð ­9Ô+AØ ŒKÔ ¨%ð, ñ, ô, ç Š,�t”xÑ Ô ð õÔ&Ð&ð”H�H�HØ”KÔ&Ô/Ð/Ð/Ø”KÔ&Ô/Ð/Ð/ð ñ ô ð ð ð ð ð r,có—|jS)z\Return the current cascade setting for this :class:`.RelationshipProperty`. )r9r†s r+razRelationshipProperty.cascade—s €ð Œ}Ðr,có0—| |¦«dSr‰)rb©rfras r+razRelationshipProperty.cascadežs€à ×Ò˜'Ñ"Ô"Ð"Ð"Ð"r,cót—t|¦«}|rl|jret|¦« tj¦«}|r7t jdd t|¦«¦«z¦«d|j vr|  |¦«||_ |j r||j _ dSdS)Na"Cascade settings "%s" should not be combined with a viewonly=True relationship. This configuration will raise an error in version 1.4. Note that in versions prior to 1.4, these cascade settings may still produce a mutating effect even though this relationship is marked as viewonly=True.ú, r)rrGr_Ú differenceÚ_viewonly_cascadesrr=ÚjoinÚsortedÚ__dict__rr9Ú_dependency_processorra)rfrar=Ú non_viewonlys r+rbz!RelationshipProperty._set_cascade¢sÕ€Ý  Ñ)Ô)ˆà ð �D”Mð ݘw™<œ<×2Ò2ÝÔ1ñôˆLðð õ” ð%ð )-¯ ª µ&¸Ñ2FÔ2FÑ(GÔ(Gñ Iñôðð �t”}Ð $Ð $Ø × (Ò (¨Ñ 1Ô 1Ð 1؈Œ à Ô %ð 9Ø18ˆDÔ &Ô .Ð .Ð .ð 9ð 9r,cóÜ—|jro|jsh|jtus|jturLt jd||jturdnd|jjj |j jj dœzd¬¦«‚|j dkrd|vsd |vrt jd |z¦«‚|jrD|j   ¦«j  |j|jjf¦«dSdS) NaíFor %(direction)s relationship %(rel)s, delete-orphan cascade is normally configured only on the "one" side of a one-to-many relationship, and not on the "many" side of a many-to-one or many-to-many relationship. To force this relationship to allow a particular "%(relatedcls)s" object to be referred towards by only a single "%(clsname)s" object at a time via the %(rel)s relationship, which would allow delete-orphan cascade to take place in this direction, set the single_parent=True flag.z many-to-onez many-to-many)ÚrelrFÚclsnameÚ relatedclsÚbbf0)ÚcodeÚallrVrWz^On %s, can't set passive_deletes='all' in conjunction with 'delete' or 'delete-orphan' cascade)Ú delete_orphanrLrFr r rIrJrŠrsrørr4Úprimary_mapperÚ_delete_orphansr>rtr²s r+rz,RelationshipProperty._check_cascade_settingsÁs9€à Ô !ð àÔ&ð ð”¥:Ð-Ð-°´Å9Ð1LÐ1LåÔ&ð /ð à”~­Ð2Ð2ð"/ à'Ø#œ{Ô1Ô:Ø"&¤+Ô"4Ô"=ð ðñð*ð-ñôð ð2 Ô  5Ò (Ð (Ø ˜Ð Ð  ?°gÐ#=Ð#=åÔ&ð;Ø=AñBñôð ð Ô ð Ø ŒK× &Ò &Ñ (Ô (Ô 8× ?Ò ?Ø”˜4œ;Ô-Ð.ñ ô ð ð ð ð ð r,cóF—|j|jvo|j|j|uS)zaReturn True if this property will persist values on behalf of the given mapper. )rtÚ relationshipsrus r+Ú _persists_forz"RelationshipProperty._persists_forís-€ð ŒH˜Ô,Ð ,ð 7ØÔ$ T¤XÔ.°$Ð6ð r,cóê—|D]o}|j� |jj |¦«rŒ)|jjj |¦«s"|jj |¦«sdSŒpdS)zˆReturn True if all columns in the given collection are mapped by the tables referenced by this :class:`.Relationship`. NFT)rBrMÚcontains_columnrŠr’r“)rfÚcolsrMs r+r¥z(RelationshipProperty._columns_are_mappedøs‡€ð ð ð ˆAà”Ð*Ø”NÔ$×4Ò4°QÑ7Ô7ð+ðØ”;Ô1Ô3×CÒCØñôð à”k”m×3Ò3°AÑ6Ô6ð ð�u�uøØˆtr,c óú—|jjrdS|j��A|j�s9t |jt j¦«r |ji}}n |j\}}|j ¦«}|j sxt|  ¦«¦«  |j ¦«}|D]<}| |¦«r%|j stjd|›d|›d|›d�¦«‚Œ=|j�A| d|jj¦«}| d|jj¦«}nL| d|jj¦«}| dd¦«}|rtjd¦«‚| d |j¦«}|j ¦«} | d |j¦«| d |j¦«| d |j¦«| d |j¦«||_t=| |j||f||jdœ|¤Ž} |  || ¦«|jr| !|j¦«dSdS)zlInterpret the 'backref' instruction to create a :func:`_orm.relationship` complementary to this one.NzError creating backref 'z' on relationship 'z+': property of that name exists on mapper 'rXrCrDzOCan't assign 'secondaryjoin' on a backref against a non-secondary relationship.rgrGrEr5rK)rgrd)"rŠr®rerdr§rÚ string_typesrrÄÚconcreter_Úiterate_to_rootÚunionÚself_and_descendantsr¯rIrJrBÚpopr‚Úsecondaryjoin_minus_localÚprimaryjoin_minus_localÚprimaryjoin_reverse_remoter­rMÚ setdefaultrGrEr5rKr1rtÚ_configure_propertyrr) rfÚ backref_keyrÁrÚcheckÚmr–r—rgrŠr2s r+r�z&RelationshipProperty._generate_backref sÍ€ð Œ;Ô "ð Ø ˆFØ Œ<Ñ #¨DÔ,?Ñ #ݘ$œ,­Ô(9Ñ:Ô:ð 3Ø&*¤l°B˜V� � à&*¤lÑ#� ˜VØ”[×/Ò/Ñ1Ô1ˆFà”?ð ݘF×2Ò2Ñ4Ô4Ñ5Ô5×;Ò;ØÔ/ñô�ððð�AØ—~’~ kÑ2Ô2ð¸1¼:ðÝ$Ô2Ð2ð +˜{˜{¨D¨D¨D°!°!°!ð5ñôðøðŒ~Ð)ð—Z’ZØ!ØÔ(ÔBñô�ð—Z’ZØ#ØÔ(Ô@ñô��ð —Z’ZØ!ØÔ(ÔCñô�ð—Z’Z °Ñ6Ô6�ØðÝ Ô4ð@ñôðð "Ÿ:š:Ø Ô ?ñôˆLð”[×/Ò/Ñ1Ô1ˆFØ × Ò ˜j¨$¬-Ñ 8Ô 8Ð 8Ø × Ò ˜m¨TÔ-=Ñ >Ô >Ð >Ø × Ò Ð/°Ô1EÑ FÔ FÐ FØ × Ò ˜n¨dÔ.?Ñ @Ô @Ð @Ø"-ˆDÔ Ý/ØØ”ØØð ð *Ø#œxð ððððˆLð × &Ò & {°LÑ AÔ AÐ Aà Ô ð <Ø × &Ò & tÔ':Ñ ;Ô ;Ð ;Ð ;Ð ;ð <ð µÐ:ˆDŒLØŒ}ð åÔ.×@Ò@Øñ0ô0ð Ô &Ð &Ð &ð ð r,có—|j}|jS)zPmemoize the 'use_get' attribute of this RelationshipLoader's lazyloader.)rÚuse_get)rfÚstrategys r+rëzRelationshipProperty._use_get^ s€ð Ô&ˆØÔÐr,có@—|j |j¦«Sr‰)rrqrŠr†s r+r·z)RelationshipProperty._is_self_referentialf s€àŒ{×(Ò(¨¬Ñ5Ô5Ð5r,cóì—d}|r |j�d}|€|r|jjr |jj}|€<|jj}|r|jjrd}|jr|€| ¦«}d}n||jjus |jjrd}|p|j}|j } |p|duo||jjup|j }|j   |||| ¦«\} } } } }|€ |jj }|€ |jj }| | ||| | fS)NFT)rBrŠÚwith_polymorphicr�r…rŒrr·r¸r¹Ú_is_from_containerr‚Ú join_targetsr£)rfr‘r�r°r±r’r“ÚaliasedÚ dest_mapperrÄrCrDrBršs r+r”z"RelationshipProperty._create_joinsj sx€ðˆà ð ˜tœ~Ð9؈Gà Ð $Ø!ð M d¤kÔ&Bð MØ$(¤KÔ$LÐ!à Ð "Ø"œkÔ4ˆOØð  D¤KÔ$@ð Ø�àÔ(ð Ð->Ð-FØ"1×"7Ò"7Ñ"9Ô"9�Ø�øà  4¤;Ô#KÐ KÐ KØŒ{Ô+ð LðˆGà$Ð3¨¬ ˆ à!Ô9ˆ Øð Ø  TÐ )ð à!Ø”{Ô?ð@ð8à$Ô7ð ð Ô × -Ò -Ø ˜°¸ñ ô ñ  Ø Ø Ø Ø Ø ð Ð $Ø $¤ Ô 7Ð Ø Ð "Ø"œkÔ5ˆOà Ø Ø Ø Ø Ø ð  ð r,)TN)FNT)FNr‰)T)FNFNNF)1rørùrúrûÚstrategy_wildcard_keyr×rlrºrÚdeprecated_paramsr?rHrvr rYrr«rÙrr1r3rr rTrerƒrgÚ staticmethodrmrrrür…rr„r}r~r|raÚsetterrbrrÈr¥r�r€rër·r”Ú __classcell__)ris@r+r1r1[sø€€€€€ð ð ð+Ðà˜ØØØØØð ñôÐð!Ðà€TÔð ðñôðØØØØØØØØØØØØ ØØ)Ð*;Ô<Ø)Ð*;Ô<ØØ+Ð,?Ô@ØØØØØ Ø Ø(Ð)9Ô:Ø*Ð+=Ô>ØØØ ØØ ØØðGa#ða#ða#ða#ða#ñôða#ðFððð$ ð ð ðWðWðWðWðW�^ñWôWðWðr  ð  ð  ð  ð"ØØð BðBðBðBðH\ð\ð\ð|ðððð$AðAðAðUðUðUðp*4Ô)?ð7ð7ð7ð7ð,<@ð6Dð6Dð6Dð6Dðpð.ð.ñ„Xð.ðð ð ñ„\ð ð ð ð ðD Ôð ð ñÔð ð: Ôð"ð"ñÔð"ð Hð Hð Hð Hð Hð>5ð>5ð>5ð@JðJðJð:ððð(ððñ„Xðð  „^ð#ð#ñ„^ð#ð9ð9ð9ð9ð>*ð*ð*ðX  ð  ð  ðððð"K<ðK<ðK<ðZððð Ôð ð ñÔð ð Ôð6ð6ñÔð6ð !ØØØØØðA ðA ðA ðA ðA ðA ðA ðA r,r1có4‡‡—ˆˆfd„Š|� ‰|¦«}dŠ|S)Ncó¶•—t|tj¦«r'| ‰ ¦«¦«}| ‰¬¦«|S)N)Úclone)r§rÚ ColumnClauser»ÚcopyÚ_copy_internals)ÚelemÚ annotationsrïs €€r+rïz _annotate_columns..clone¯ sQø€Ý �d�JÔ3Ñ 4Ô 4ð 6Ø—>’> +×"2Ò"2Ñ"4Ô"4Ñ5Ô5ˆDØ ×Ò 5ÐÑ)Ô)Ð)؈ r,rè)Úelementrôrïs `@r+r'r'® sAøø€ððððððð ÐØ�%˜‘.”.ˆØ €EØ €Nr,c óè—eZdZdddddddddddd„f d„Zd„Zd„Zd„Zed „¦«Zed „¦«Z e j d „¦«Z d „Z e j d „¦«Ze j d„¦«Zd„Zd„Zd„Zd„Zd„Zd„Zd„Zd„Zd„Zd„Zd„Zd„Zd„Zd„Zd„Zd„Zd„Z d „Z!d!„Z"e#j$¦«Z%d"„Z&e j d#„¦«Z'e j d$„¦«Z(e j d%„¦«Z)d&„Z*d'„Z+ d*d(„Z,d+d)„Z-dS),r¢NFTcó—dS)NTrè)rMs r+úzJoinCondition.Í s€ D€r,cóð—||_||_||_||_||_| |_||_||_||_| |_ | |_ | |_ ||_ | |_ ||_||_| ¦«| ¦«| ¦«| ¦«| ¦«| ¦«| ¦«| |jd¦«|j�| |jd¦«| ¦«| ¦«| ¦«dS©NTF)r˜ršr™r›rœr�rCrDrBržrhÚ _remote_siderzrŸr r¡Ú_determine_joinsÚ_sanitize_joinsÚ _annotate_fksÚ_annotate_remoteÚ_annotate_localÚ_annotate_parentmapperÚ _setup_pairsÚ_check_foreign_colsÚ_determine_directionÚ_check_remote_sideÚ _log_joins)rfr˜r™ršr›rCrBrDrœr�ržrVrOrŸrzr r¡s r+r?zJoinCondition.__init__¼ sv€ð&*CˆÔ&Ø'>ˆÔ$Ø(@ˆÔ%Ø&<ˆÔ#Ø"4ˆÔØ!2ˆÔØ&ˆÔØ*ˆÔØ"ˆŒØ(@ˆÔ%Ø#5ˆÔ Ø'ˆÔ؈Œ Ø 0ˆÔØ(ˆÔØ 0ˆÔØ ×ÒÑÔÐØ ×ÒÑÔÐØ ×ÒÑÔÐØ ×ÒÑÔÐØ ×ÒÑÔÐØ ×#Ò#Ñ%Ô%Ð%Ø ×ÒÑÔÐØ × Ò  Ô!1°4Ñ8Ô8Ð8Ø Ô Ð )Ø × $Ò $ TÔ%7¸Ñ ?Ô ?Ð ?Ø ×!Ò!Ñ#Ô#Ð#Ø ×ÒÑ!Ô!Ð!Ø �ŠÑÔÐÐÐr,có—|j€dS|jj}|jd|j|j¦«|jd|j|j¦«|jd|jd d„|jD¦«¦«¦«|jd|jd d„|jpgD¦«¦«¦«|jd|jd d „|jD¦«¦«¦«|jd |jd d „|j D¦«¦«¦«|jd |jd d „|j D¦«¦«¦«|jd|j|j ¦«dS)Nz%s setup primary join %sz%s setup secondary join %sz%s synchronize pairs [%s]ú,c3ó.K—|]\}}d|›d|›d�V—ŒdS©ú(z => rwNrè©räÚlrFs r+rŒz+JoinCondition._log_joins..ö sFèè€ððÙ*0¨1¨a¨a    1 1 1Ð%ððððððr,z#%s secondary synchronize pairs [%s]c3ó.K—|]\}}d|›d|›d�V—ŒdSr rèr s r+rŒz+JoinCondition._log_joins..ý sIèè€ððá�Q˜˜ð!"   1 1 1Ð%ððððððr,z%s local/remote pairs [%s]c3ó.K—|]\}}d|›d|›d�V—ŒdS)r z / rwNrèr s r+rŒz+JoinCondition._log_joins.. sFèè€ððÙ)/¨!¨Q¨Q˜q˜q˜q ! ! !Ð$ððððððr,z%s remote columns [%s]c3ó K—|] }d|zV—Œ dS©z%sNrè©rärÜs r+rŒz+JoinCondition._log_joins.. s&èè€Ð?Ð? C�T˜C‘ZÐ?Ð?Ð?Ð?Ð?Ð?r,z%s local columns [%s]c3ó K—|] }d|zV—Œ dSrrèrs r+rŒz+JoinCondition._log_joins.. s&èè€Ð>Ð> C�T˜C‘ZÐ>Ð>Ð>Ð>Ð>Ð>r,z%s relationship direction %s) rzÚloggerr]rCrDr·r¨r«rVr¦r§rF)rfrs r+rzJoinCondition._log_joinsí s逨 Œ9Ð Ø ˆFØŒiԈ؈ŒÐ+¨T¬Y¸Ô8HÑIÔIÐI؈ŒÐ-¨t¬y¸$Ô:LÑMÔMÐM؈ŒØ 'Ø ŒIØ �HŠHððØ48Ô4Jðñôñ ô ñ ô ð ð ˆŒØ 1Ø ŒIØ �HŠHððà"Ô>ÐDÀ"ðñôñ ô ñ ô ð ð ˆŒØ (Ø ŒIØ �HŠHððØ37Ô3Jðñôñ ô ñ ô ð ð ˆŒØ $Ø ŒIØ �HŠHÐ?Ð?¨4Ô+>Ð?Ñ?Ô?Ñ ?Ô ?ñ ô ð ð ˆŒØ #Ø ŒIØ �HŠHÐ>Ð>¨4Ô+=Ð>Ñ>Ô>Ñ >Ô >ñ ô ð 𠈌Ð/°´¸D¼NÑKÔKÐKÐKÐKr,có„—t|jd¬¦«|_|j�t|jd¬¦«|_dSdS)abremove the parententity annotation from our join conditions which can leak in here based on some declarative patterns and maybe others. We'd want to remove "parentmapper" also, but apparently there's an exotic use case in _join_fixture_inh_selfref_w_entity that relies upon it being present, see :ticket:`3364`. )rq©ÚvaluesN)rrCrDr†s r+rýzJoinCondition._sanitize_joins s]€õ,Ø Ô Ð%6ð ñ ô ˆÔð Ô Ð )Ý!1ØÔ"Ð+<ð"ñ"ô"ˆDÔ Ð Ð ð *Ð )r,c óâ—|j�#|j€tjd|jz¦«‚ |jpd}|j�`|j€'t |j|j|j|¬¦«|_|j €)t |j |j|j |¬¦«|_ dSdS|j €)t |j |j|j |¬¦«|_ dSdS#tj $r‚}|j�:tjtj d|j›d|j›d�¦«|¬¦«n6tjtj d|jz¦«|¬¦«Yd}~dSYd}~dSd}~wtj$r‚}|j�:tjtjd|j›d |j›d �¦«|¬¦«n6tjtjd |jz¦«|¬¦«Yd}~dSYd}~dSd}~wwxYw) zõDetermine the 'primaryjoin' and 'secondaryjoin' attributes, if not passed to the constructor already. This is based on analysis of the foreign key relationships between the parent and target mapped selectables. NzMProperty %s specified with secondary join condition but no secondary argument)Úa_subsetržzOCould not determine join condition between parent/child tables on relationship zG - there are no foreign keys linking these tables via secondary table 'z—'. Ensure that referencing columns are associated with a ForeignKey or ForeignKeyConstraint, or specify 'primaryjoin' and 'secondaryjoin' expressions.)Úfrom_aCould not determine join condition between parent/child tables on relationship %s - there are no foreign keys linking these tables. Ensure that referencing columns are associated with a ForeignKey or ForeignKeyConstraint, or specify a 'primaryjoin' expression.zP - there are multiple foreign key paths linking the tables via secondary table 'zÉ'. Specify the 'foreign_keys' argument, providing a list of those columns which should be counted as containing a foreign key reference from the secondary table to each of the parent and child tables.a'Could not determine join condition between parent/child tables on relationship %s - there are multiple foreign key paths linking the tables. Specify the 'foreign_keys' argument, providing a list of those columns which should be counted as containing a foreign key reference to the parent table.)rDrBrIrJrzržr r™r›rCr˜ršÚNoForeignKeysErrorrÚraise_ÚAmbiguousForeignKeysError)rfržÚnfeÚafes r+rüzJoinCondition._determine_joins' sû€ð Ô Ð )¨d¬nÐ.DÝÔ&ð(à*.¬)ñ4ñôð ðS Ø'+Ô'DÐ'LÈÐ $ØŒ~Ð)ØÔ%Ð-Ý)7ØÔ5ØœØ!%Ô!<Ø1Ið *ñ*ô*�DÔ&ð Ô#Ð+Ý'5ØÔ6ØœØ!%Ô!=Ø1Ið (ñ(ô(�DÔ$Ð$Ð$ð,Ð+ðÔ#Ð+Ý'5ØÔ6ØÔ5Ø!%Ô!=Ø1Ið (ñ(ô(�DÔ$Ð$Ð$ð,Ð+øõÔ(ð ð ð ØŒ~Ð)Ý” ÝÔ-Ð-ð+/¬)¨)¨)°T´^°^°^ðEñ ô ðð ñ ô ð ð õ” ÝÔ-ð>ð AEÄ ñ Jñôðð ñ ô ð ð ð ð ð ð ð ð ð ð ð ð ð øøøøõ4Ô/ð ð ð ØŒ~Ð)Ý” ÝÔ4Ð4ð œ9˜9˜9 d¤n n nð 6ñ ô ððñôððõ ” ÝÔ4ðEðœ)ñ$ñ ô ðð ñ ô ð ð ð ð ð ð ð ð!ðððððøøøøð øøøs,¬A,CÂ.CÃG.ÃA1EÅG.Å,A1G)Ç)G.có.—t|jd¬¦«S©N©Úlocalr%r)rrCr†s r+rÔz%JoinCondition.primaryjoin_minus_local� s€å Ô 0Ð9LÐMÑMÔMÐMr,có.—t|jd¬¦«Sr!)rrDr†s r+rÓz'JoinCondition.secondaryjoin_minus_local” s€å Ô 2Ð;NÐOÑOÔOÐOr,có®—|jrd„}tj|ji|¦«S|jrt |jd¬¦«St |j¦«S)a(Return the primaryjoin condition suitable for the "reverse" direction. If the primaryjoin was delivered here with pre-existing "remote" annotations, the local/remote annotations are reversed. Otherwise, the local/remote annotations are removed. có—d|jvr6|j ¦«}|d=d|d<| |¦«Sd|jvr6|j ¦«}|d=d|d<| |¦«SdS)Nr%Tr#)Ú _annotationsrñÚ_with_annotations)rõros r+Úreplacez9JoinCondition.primaryjoin_reverse_remote..replace¥ s–€Ø˜wÔ3Ð3Ð3ØÔ,×1Ò1Ñ3Ô3�Aؘ(˜ Ø!%�A�g‘JØ"×4Ò4°QÑ7Ô7Ð7Ø Ô 4Ð4Ð4ØÔ,×1Ò1Ñ3Ô3�Aؘ'˜ Ø"&�A�h‘KØ"×4Ò4°QÑ7Ô7Ð7ð 5Ð4r,r"r)Ú_has_remote_annotationsrÚreplacement_traverserCÚ_has_foreign_annotationsr)rfr)s r+rÕz(JoinCondition.primaryjoin_reverse_remote˜ sv€ð Ô 'ð :ð 8ð 8ð 8õÔ0°Ô1AÀ2ÀwÑOÔOÐ OàÔ,ð :å'ØÔ$Ð-@ðñôðõ(¨Ô(8Ñ9Ô9Ð9r,cóN—tj|i¦«D]}||jvrdSŒdSrú)rÚiterater')rfrÑÚ annotationrÜs r+Ú_has_annotationzJoinCondition._has_annotation» s?€ÝÔ# F¨BÑ/Ô/ð ð ˆCؘSÔ-Ð-Ð-Ø�t�tð.ð�5r,có8—| |jd¦«S©Nr.©r0rCr†s r+r,z&JoinCondition._has_foreign_annotations s€à×#Ò# DÔ$4°iÑ@Ô@Ð@r,có8—| |jd¦«S©Nr%r3r†s r+r*z%JoinCondition._has_remote_annotationsÆ s€à×#Ò# DÔ$4°hÑ?Ô?Ð?r,cóz—|jrdS|jr| ¦«dS| ¦«dS)z‘Annotate the primaryjoin and secondaryjoin structures with 'foreign' annotations marking columns considered as foreign. N)r,ržÚ_annotate_from_fk_listÚ_annotate_present_fksr†s r+rþzJoinCondition._annotate_fksÊ sO€ð Ô (ð Ø ˆFà Ô (ð )Ø × 'Ò 'Ñ )Ô )Ð )Ð )Ð )à × &Ò &Ñ (Ô (Ð (Ð (Ð (r,c󤇗ˆfd„}tj‰ji|¦«‰_‰j�"tj‰ji|¦«‰_dSdS)NcóH•—|‰jvr| ddi¦«SdS©Nr.T)ržr»ràs €r+Úcheck_fkz6JoinCondition._annotate_from_fk_list..check_fkÙ s0ø€Ø�dÔ3Ð3Ð3Ø—}’} i°Ð%6Ñ7Ô7Ð7ð4Ð3r,©rr+rCrD)rfr<s` r+r7z$JoinCondition._annotate_from_fk_listØ suø€ð 8ð 8ð 8ð 8ð 8õ$Ô8Ø Ô ˜b (ñ ô ˆÔð Ô Ð )Ý!)Ô!>ØÔ" B¨ñ"ô"ˆDÔ Ð Ð ð *Ð )r,có ‡‡—|j�tj|jj¦«Šnt ¦«Šˆfd„Šˆfd„}t j|jid|i¦«|_|j�$t j|jid|i¦«|_dSdS)Ncó•—t|tj¦«rHt|tj¦«r.| |¦«r|S| |¦«r|S‰r|‰vr|‰vr|S|‰vr|‰vr|SdSdSdSr‰)r§rÚColumnÚ references)ÚaÚbÚ secondarycolss €r+Ú is_foreignz7JoinCondition._annotate_present_fks..is_foreignë s¬ø€Ý˜!�Vœ]Ñ+Ô+ð µ ¸1½f¼mÑ0LÔ0Lð Ø—<’< ‘?”?ðØ�HØ—\’\ !‘_”_ðØ�Hàð Ø˜ Ð%Ð%¨!°=Ð*@Ð*@Ø�Hؘ-Ð'Ð'¨A°]Ð,BÐ,BØ�Hð  ð ð(Ð'Ð,BÐ,Br,cóð•—t|jtj¦«rt|jtj¦«sdSd|jjvr d|jjvr”‰|j|j¦«}|�~| |j¦«r#|j ddi¦«|_dS| |j¦«r)|j ddi¦«|_dSdSdSdSdSr;)r§ÚleftrÚ ColumnElementÚrightr'Úcomparer»)ÚbinaryrÜrEs €r+Ú visit_binaryz9JoinCondition._annotate_present_fks..visit_binaryø s ø€ÝØ” �SÔ.ñôð å ¤ ­cÔ.?Ñ@Ô@ð ð�ð ¤Ô!9Ð9Ð9Ø V¤\Ô%>Ð>Ð>à �j ¤¨f¬lÑ;Ô;�Ø�?Ø—{’{ 6¤;Ñ/Ô/ðØ&,¤k×&;Ò&;¸YÈÐÐ>ð#�?ððr,rK) rBrr�rMr_rrrCrD)rfrLrErDs @@r+r8z#JoinCondition._annotate_present_fkså sÀøø€Ø Œ>Ð %Ý œO¨D¬NÔ,<Ñ=Ô=ˆMˆMå™EœEˆMð ð ð ð ð ð ð ð ð ð õ&$Ô3Ø Ô ˜b 8¨\Ð":ñ ô ˆÔð Ô Ð )Ý!)Ô!9ØÔ" B¨°<Ð(@ñ"ô"ˆDÔ Ð Ð ð *Ð )r,c󂇇‡—|jŠ|jŠdgŠˆˆˆfd„}tj|jid|i¦«‰dS)zvReturn True if the join condition contains column comparisons where both columns are in both tables. Fcó~•—|j|j}}t|tj¦«r‰t|tj¦«rq‰ |j¦«rY‰ |j¦«rA‰ |j¦«r)‰ |j¦«rd‰d<dSdSdSdSdSdSdS)NTr)rGrIr§rrðÚis_derived_fromÚtable)rKrMÚfÚmtÚptÚresults €€€r+rLz;JoinCondition._refers_to_parent_table..visit_binary síø€Ø”; ¤ ˆqˆAå˜1�jÔ5Ñ6Ô6ð !å˜q¥*Ô"9Ñ:Ô:ð !ð×&Ò& q¤wÑ/Ô/ð !ð×&Ò& q¤wÑ/Ô/ð  !ð ×&Ò& q¤wÑ/Ô/ð  !ð ×&Ò& q¤wÑ/Ô/ð  !ð!��q‘ � � ð !ð !ð !ð !ð !ð !ð !ð !ð !ð !ð !ð !r,rKr)r˜r™rrºrC)rfrLrRrSrTs @@@r+Ú_refers_to_parent_tablez%JoinCondition._refers_to_parent_table sjøøø€ð Ô +ˆØ Ô *ˆØ�ˆð !ð !ð !ð !ð !ð !ð !õ Ô˜$Ô*¨B°¸<Ð0HÑIÔIÐIØ�aŒyÐr,có6—t|j|j¦«S)z5Return True if parent/child tables have some overlap.)r!r˜r™r†s r+Ú_tables_overlapzJoinCondition._tables_overlap+ s!€õ#Ø Ô *¨DÔ,Iñ ô ð r,cóp—|jrdS|j�| ¦«dS|js|jr| ¦«dS| ¦«r| d„d¦«dS| ¦«r|  ¦«dS|  ¦«dS)z¢Annotate the primaryjoin and secondaryjoin structures with 'remote' annotations marking columns considered as part of the 'remote' side. Ncó—d|jvSr2©r')rÜs r+røz0JoinCondition._annotate_remote..A s€˜I¨Ô)9Ð9€r,F) r*rBÚ_annotate_remote_secondaryrhrûÚ_annotate_remote_from_argsrUÚ_annotate_selfrefrWÚ_annotate_remote_with_overlapÚ%_annotate_remote_distinct_selectablesr†s r+rÿzJoinCondition._annotate_remote2 så€ð Ô 'ð Ø ˆFà Œ>Ð %Ø × +Ò +Ñ -Ô -Ð -Ð -Ð -Ø Ô %ð 9¨Ô):ð 9Ø × +Ò +Ñ -Ô -Ð -Ð -Ð -Ø × )Ò )Ñ +Ô +ð 9Ø × "Ò "Ø9Ð9¸5ñ ô ð ð ð ð× !Ò !Ñ #Ô #ð 9Ø × .Ò .Ñ 0Ô 0Ð 0Ð 0Ð 0à × 6Ò 6Ñ 8Ô 8Ð 8Ð 8Ð 8r,có’‡—ˆfd„}tj‰ji|¦«‰_tj‰ji|¦«‰_dS)z^annotate 'remote' in primaryjoin, secondaryjoin when 'secondary' is present. cót•—‰jj |¦«r| ddi¦«SdS©Nr%T)rBrMrÊr»©rõrfs €r+Úreplz6JoinCondition._annotate_remote_secondary..replN sAø€ØŒ~Ô×/Ò/°Ñ8Ô8ð ;Ø×(Ò(¨(°DÐ)9Ñ:Ô:Ð:ð ;ð ;r,Nr=©rfrds` r+r[z(JoinCondition._annotate_remote_secondaryH sdø€ð  ;ð ;ð ;ð ;ð ;õ$Ô8Ø Ô ˜b $ñ ô ˆÔõ&Ô:Ø Ô   Dñ ô ˆÔÐÐr,có^‡‡‡—ˆˆˆfd„}tj‰jid|i¦«‰_dS)zxannotate 'remote' in primaryjoin, secondaryjoin when the relationship is detected as self-referential. cóÆ•—|j |j¦«}t|jtj¦«r‰t|jtj¦«rj‰|j¦«r!|j ddi¦«|_‰|j¦«r%|s%|j ddi¦«|_dSdSdS‰s‰ ¦«dSdSrb)rGrJrIr§rrðr»Ú_warn_non_column_elements)rKÚequatedÚfnÚremote_side_givenrfs €€€r+rLz5JoinCondition._annotate_selfref..visit_binary_ sþø€Ø”k×)Ò)¨&¬,Ñ7Ô7ˆGݘ&œ+¥zÔ'>Ñ?Ô?ð 1ÅJØ” �jÔ5ñEôEð 1ð�2�f”k‘?”?ðJØ"(¤+×"7Ò"7¸À4Ð8HÑ"IÔ"I�F”KØ�2�f”lÑ#Ô#ðL¨GðLØ#)¤<×#9Ò#9¸8ÀTÐ:JÑ#KÔ#K�F”L�L�LðLðLðLðLà&ð 1Ø×.Ò.Ñ0Ô0Ð0Ð0Ð0ð 1ð 1r,rKN)rrrC)rfrjrkrLs``` r+r]zJoinCondition._annotate_selfrefY sTøøø€ð 1ð 1ð 1ð 1ð 1ð 1ð 1õ$Ô3Ø Ô ˜b 8¨\Ð":ñ ô ˆÔÐÐr,có&‡—|jr-|jrtjd¦«‚d„|jD¦«Šn|jŠ| ¦«r| ˆfd„d¦«dSˆfd„}t j|ji|¦«|_dS)z�annotate 'remote' in primaryjoin, secondaryjoin when the 'remote_side' or '_local_remote_pairs' arguments are used. zTremote_side argument is redundant against more detailed _local_remote_side argument.có—g|]\}}|‘ŒSrèrèr s r+ræz.~ s€ÐDÐDÐD¡ ! Q˜1ÐDÐDÐDr,có •—|‰vSr‰rè)rÜrOs €r+røz:JoinCondition._annotate_remote_from_args..ƒ s ø€¨s°kÐ/A€r,Tcó>•—|‰vr| ddi¦«SdSrb)r»)rõrOs €r+rdz6JoinCondition._annotate_remote_from_args..repl† s/ø€Ø˜kÐ)Ð)Ø"×,Ò,¨h¸Ð-=Ñ>Ô>Ð>ð*Ð)r,N) rhrûrIrJrUr]rr+rC)rfrdrOs @r+r\z(JoinCondition._annotate_remote_from_argsp sÒø€ð Ô #ð ,ØÔ ð ÝÔ*ð ñôðð EÐD¨4Ô+CÐDÑDÔDˆKˆKàÔ+ˆKà × 'Ò 'Ñ )Ô )ð Ø × "Ò "Ð#AÐ#AÐ#AÐ#AÀ4Ñ HÔ HÐ HÐ HÐ Hð ?ð ?ð ?ð ?ð ?õ (Ô<ØÔ  " dñ ô ˆDÔ Ð Ð r,c󨇇‡—ˆfd„}‰jduo‰jj‰jjuŠˆˆfd„Štj‰jid|i¦«‰_dS)zÆannotate 'remote' in primaryjoin, secondaryjoin when the parent/child tables have some set of tables in common, though is not a fully self-referential relationship. có”•—‰|j|j¦«\|_|_‰|j|j¦«\|_|_dSr‰)rGrI)rKÚproc_left_rights €r+rLzAJoinCondition._annotate_remote_with_overlap..visit_binary– sOø€Ø(7¨Ø” ˜Vœ\ñ)ô)Ñ %ˆFŒK˜œð)8¨Ø” ˜fœkñ)ô)Ñ %ˆFŒL˜&œ+˜+˜+r,NcóH•—t|tj¦«rpt|tj¦«rV‰jj |¦«r6‰jj |¦«r| ddi¦«}n”‰r>|j  d¦«‰j j ur| ddi¦«}nT‰r>|j  d¦«‰j j ur| ddi¦«}n‰  ¦«||fS)Nr%Tr~) r§rrðr™rMrÊr˜r»r'r;rzrrh)rGrIÚcheck_entitiesrfs €€r+rrzDJoinCondition._annotate_remote_with_overlap..proc_left_right¢ s'ø€Ý˜$¥ Ô 7Ñ8Ô8ð 1½ZØ•zÔ.ñ>ô>ð 1ðÔ0Ô2×BÒBØñôð>àÔ4Ô6×FÒFÀtÑLÔLð>ð"ŸOšO¨X°tÐ,<Ñ=Ô=�Eøàð 1àÔ&×*Ò*¨>Ñ:Ô:¸d¼iÔ>NÐNÐNàŸš¨°4Ð(8Ñ9Ô9��àð 1àÔ%×)Ò)¨.Ñ9Ô9¸T¼YÔ=MÐMÐMà—~’~ x°Ð&6Ñ7Ô7��à×.Ò.Ñ0Ô0Ð0à˜�;Ð r,rK)rzrrŠrrrC)rfrLrtrrs` @@r+r^z+JoinCondition._annotate_remote_with_overlapŽ s�øøø€ð ð ð ð ð ð ŒI˜TÐ !Ð N d¤iÔ&6¸d¼iÔ>NÐ&Nð ð ð ð ð ð ð õ.$Ô3Ø Ô ˜b 8¨\Ð":ñ ô ˆÔÐÐr,cóR‡—ˆfd„}tj‰ji|¦«‰_dS)z}annotate 'remote' in primaryjoin, secondaryjoin when the parent/child tables are entirely separate. cóô•—‰jj |¦«rU‰jj |¦«r‰jj |¦«r| ddi¦«SdSdSrb)r™rMrÊršr›r»rcs €r+rdzAJoinCondition._annotate_remote_distinct_selectables..replÄ s†ø€ØÔ,Ô.×>Ò>¸wÑGÔGð ;ØÔ0Ô2×BÒBÀ7ÑKÔKð ;àÔ.Ô0×@Ò@ÀÑIÔIð ;ð×(Ò(¨(°DÐ)9Ñ:Ô:Ð:ð  ;ð ;ð ;ð ;r,N)rr+rCres` r+r_z3JoinCondition._annotate_remote_distinct_selectables½ sCø€ð ;ð ;ð ;ð ;ð ;õ$Ô8Ø Ô ˜b $ñ ô ˆÔÐÐr,có>—tjd|jz¦«dS)NzƒNon-simple column elements in primary join condition for property %s - consider using remote() annotations to mark the remote side.)rr=rzr†s r+rhz'JoinCondition._warn_non_column_elementsÏ s0€Ý Œ ð <à>B¼iñ Hñ ô ð ð ð r,có‡—| |jd¦«rdS|jr$tjd„|jD¦«¦«Šntj|jj¦«Šˆfd„}tj|ji|¦«|_dS)aCAnnotate the primaryjoin and secondaryjoin structures with 'local' annotations. This annotates all column elements found simultaneously in the parent table and the join condition that don't have a 'remote' annotation set up from _annotate_remote() or user-defined. r#Ncó—g|]\}}|‘ŒSrèrèr s r+ræz1JoinCondition._annotate_local..æ s€Ð:Ð:Ð:‘v˜˜1�Ð:Ð:Ð:r,cóT•—d|jvr|‰vr| ddi¦«SdSdS)Nr%r#T)r'r»)róÚ local_sides €r+Úlocals_z.JoinCondition._annotate_local..locals_ë s?ø€Ø˜tÔ0Ð0Ð0°T¸ZÐ5GÐ5GØ—~’~ w° oÑ6Ô6Ð6ð1Ð0Ð5GÐ5Gr,) r0rCrhrr�r˜rMrr+)rfr|r{s @r+rzJoinCondition._annotate_localÖ s¯ø€ð × Ò  Ô 0°'Ñ :Ô :ð Ø ˆFà Ô #ð KÝœØ:Ð: Ô!9Ð:Ñ:Ô:ñôˆJˆJõœ¨Ô)GÔ)IÑJÔJˆJð 7ð 7ð 7ð 7ð 7õ$Ô8Ø Ô ˜b 'ñ ô ˆÔÐÐr,cód‡—‰j€dSˆfd„}tj‰ji|¦«‰_dS)Ncó°•—d|jvr!| d‰jji¦«Sd|jvr!| d‰jji¦«SdS)Nr%r~r#)r'r»rzrrŠ)rórfs €r+Úparentmappers_z.parentmappers_÷ s_ø€Ø˜4Ô,Ð,Ð,Ø—~’~ ~°t´yÔ7GÐ&HÑIÔIÐIؘDÔ-Ð-Ð-Ø—~’~ ~°t´yÔ7GÐ&HÑIÔIÐIð.Ð-r,)rzrr+rC)rfrs` r+rz$JoinCondition._annotate_parentmapperó sUø€Ø Œ9Ð Ø ˆFð Jð Jð Jð Jð Jõ $Ô8Ø Ô ˜b .ñ ô ˆÔÐÐr,cóN—|jstjd|j›d�¦«‚dS)Nria could not determine any unambiguous local/remote column pairs based on join condition and remote_side arguments. Consider using the remote() annotation to accurately mark those elements of the join condition that are on the remote side of the relationship.)rVrIrJrzr†s r+rz JoinCondition._check_remote_side s?€ØÔ&ð ÝÔ&Ð&ð(,¤y y yð3ñ ô ð ð ð r,cóœ—d}| |d¦«}t|¦«}|rt|j¦«}nt|j¦«}|jr|s |js|rdS|jr2|r0|s.d|rdpd›d|›d|j›d �}|d z }t j|¦«‚d |rdpd›d|›d|j›d �}|d z }t j|¦«‚) zHCheck the foreign key columns collected and emit error messages.Fr.NzbCould not locate any simple equality expressions involving locally mapped foreign key columns for ÚprimaryrBz join condition 'z' on relationship r/a Ensure that referencing columns are associated with a ForeignKey or ForeignKeyConstraint, or are annotated in the join condition with the foreign() annotation. To allow comparison operators other than '==', the relationship can be marked as viewonly=True.z6Could not locate any relevant foreign key columns for z¡ Ensure that referencing columns are associated with a ForeignKey or ForeignKeyConstraint, or are annotated in the join condition with the foreign() annotation.)Ú_gather_columns_with_annotationÚboolr¨r«r rzrIrJ)rfr r‚Úcan_syncÚ foreign_colsÚ has_foreignÚerrs r+rz!JoinCondition._check_foreign_cols sW€ðˆà×;Ò;Ø ˜Iñ ô ˆ õ˜<Ñ(Ô(ˆ à ð >ݘDÔ2Ñ3Ô3ˆHˆHå˜DÔ<Ñ=Ô=ˆHð Ô ð àð ðÔ%ð ð+6ð ð ˆFð Ô ð% , ð% ,°Xð% ,ð% ,ðÐ)  Ð8¨[Ð8Ð8Ø"�N�NØ”I�I�Iðð ð ðIñ ˆCõÔ& sÑ+Ô+Ð +øð Ð)  Ð8¨[Ð8Ð8Ø"�N�NØ”I�I�Ið ð ð ðñ ˆCõ Ô& sÑ+Ô+Ð +r,cóB—|j�t|_dStj|jj¦«}tj|jj¦«}| |j ¦«}| |j ¦«}|rÝ|rÛ|  |j dd¦«}td„|  |j d¦«D¦«¦«}|rK|rI|j  |j¦«}| |¦«}| |¦«}|r|st |_dS|r|st"|_dSt%jd|jz¦«‚|rt |_dS|rt"|_dSt%jd|jz¦«‚)z[Determine if this relationship is one to many, many to one, many to many. Nr%r.có$—g|] }d|jv¯ |‘ŒS)r%rZ)rärMs r+ræz6JoinCondition._determine_direction..r s3€ðððàð$¨1¬>Ð9Ð9ð ð:Ð9Ð9r,aDCan't determine relationship direction for relationship '%s' - foreign key columns within the join condition are present in both the parent and the child's mapped tables. Ensure that only those columns referring to a parent column are marked as foreign, either via the foreign() annotation or via the foreign_keys argument.z’Can't determine relationship direction for relationship '%s' - foreign key columns are present in neither the parent nor the child's mapped tables)rDr rFrr�r˜rMr™Ú intersectionr©rƒrCr_r¦r§rµr r rIrJrz)rfÚ parentcolsÚ targetcolsÚ onetomany_fkÚ manytoone_fkÚonetomany_localÚmanytoone_localÚ self_equateds r+rz"JoinCondition._determine_directionP sï€ð Ô Ð )Ý'ˆDŒNˆNˆN在Ô)GÔ)IÑJÔJˆJÝœ¨Ô)FÔ)HÑIÔIˆJð&×2Ò2°4Ô3KÑLÔLˆLð&×2Ò2°4Ô3KÑLÔLˆLàð@   ð@ ð#'×"FÒ"FØÔ$ h° ñ#ô#�õ #&ððà!%×!EÒ!EØ Ô,¨iñ"ô"ðñôñ#ô#�ð#ðO ðOØ#'Ô#6×#CÒ#CØÔ*ñ$ô$�Lð'6×&@Ò&@ÀÑ&NÔ&N�OØ&5×&@Ò&@ÀÑ&NÔ&N�Oð #ð¨?ðÝ%.�D”N�N�NØ$ð ¨_ð Ý%.�D”N�N�Nå Ô.ð9ð<@¼9ñEñ ô ð ðð Ý!*�”��Øð Ý!*�”��åÔ*ð4ð7;´iñ@ñôðr,có—d„|D¦«S)zÅprovide deannotation for the various lists of pairs, so that using them in hashes doesn't incur high-overhead __eq__() comparisons against original columns mapped. cód—g|]-\}}| ¦«| ¦«f‘Œ.Srè©Ú _deannotaterés r+ræz3JoinCondition._deannotate_pairs..« s1€ÐJÐJÐJ±t°q¸!�—’‘” !§-¢-¡/¤/Ð2ÐJÐJÐJr,rè)rfÚ collections r+Ú_deannotate_pairszJoinCondition._deannotate_pairs¤ s€ðKÐJ¸zÐJÑJÔJÐJr,có0‡‡—g}tjg¦«Šg}ˆˆfd„}‰j|f‰j|ffD]\}}|€Œ|||¦«Œ‰ ‰¦«‰_‰ |¦«‰_‰ |¦«‰_dS)Ncó8•‡—ˆˆˆfd„}t||¦«dS)Ncóä•—d|jvr6d|jvr-‰ |¦«r‰ ||f¦«n>d|jvr5d|jvr,‰ |¦«r‰ ||f¦«|jtjurZ‰ ||¦«rFd|jvr‰ ||f¦«dSd|jvr‰ ||f¦«dSdSdSdS)Nr%r.)r'r¡r^ÚoperatorrÚeqr>)rKrGrIr—Úlrprfs €€€r+rLz.go..visit_binary³ s3ø€à Ô 2Ð2Ð2Ø ¨Ô(9Ð9Ð9Ø×-Ò-¨dÑ3Ô3ð:ð—G’G˜T 5˜MÑ*Ô*Ð*Ð*à Ô 1Ð1Ð1Ø ¨Ô(:Ð:Ð:Ø×-Ò-¨eÑ4Ô4ð;ð—G’G˜U D˜MÑ*Ô*Ð*Ø”?¥i¤lÐ2Ð2°t×7LÒ7Lؘ%ñ8ô8Ð2ð! EÔ$6Ð6Ð6Ø"×)Ò)¨4°¨-Ñ8Ô8Ð8Ð8Ð8Ø" dÔ&7Ð7Ð7Ø"×)Ò)¨5°$¨-Ñ8Ô8Ð8Ð8Ð8ð 3Ð2Ð2Ð2ð 8Ð7r,r")Újoincondr—rLržrfs ` €€r+Úgoz&JoinCondition._setup_pairs..go² s?øø€ð 9ð 9ð 9ð 9ð 9ð 9ð 9õ* ! ¨xÑ 8Ô 8Ð 8Ð 8Ð 8r,)rÚ OrderedSetrCrDr˜rVr¨r«)rfÚ sync_pairsÚsecondary_sync_pairsr rŸr—ržs` @r+rzJoinCondition._setup_pairs­ sØøø€Øˆ ÝŒo˜bÑ!Ô!ˆØ!Ðð 9ð 9ð 9ð 9ð 9ð 9ð2Ô ˜zÐ *Ø Ô Ð!5Ð 6ð% ð %ð %Ñ ˆH�jðÐØØ ˆBˆx˜Ñ $Ô $Ð $Ð $à"&×"8Ò"8¸Ñ"=Ô"=ˆÔØ!%×!7Ò!7¸ Ñ!CÔ!CˆÔØ+/×+AÒ+AØ ñ, ô, ˆÔ(Ð(Ð(r,cóú‡—|jsdSd„|jD¦«d„|jD¦«zD�]K\}Št‰j¦«dkrŒ‰|jvr$t j|j|i¦«|j‰<ŒLg}|j‰}|  ¦«D]\}}|j tj vrg|j  |j¦«s|  |jj¦«r)||ur%||jjvr| ||f¦«Œ€|rEt#jd|j›d|›d‰›dd ˆfd „|D¦«¦«›d � ¦«||j‰|j<�ŒMdS) Ncó—g|] \}}||f‘Œ Srèrè©rärÚto_s r+ræzDJoinCondition._warn_for_conflicting_sync_targets..ã s-€ð ð ð Ù)˜e SˆU�CˆLð ð ð r,có—g|] \}}||f‘Œ Srèrèr¦s r+ræzDJoinCondition._warn_for_conflicting_sync_targets..å s-€ð ð ð Ù)˜e SˆU�CˆLð ð ð r,rrvz' will copy column z to column z(, which conflicts with relationship(s): r´c3ó6•K—|]\}}d|›d|›d‰›d�V—ŒdS)rXz ' (copies z to rwNrè)räÚprÚfr_r§s €r+rŒzCJoinCondition._warn_for_conflicting_sync_targets.. sPøèè€ð&ð&á$- R¨¨ð=?¸B¸BÀÀÀÀSÀSÀSÐ Ið&ð&ð&ð&ð&ð&r,z˜. Consider applying viewonly=True to read-only relationships, or provide a primaryjoin condition marking writable columns with the foreign() annotation.)r r¨r«ÚlenrgÚ_track_overlapping_sync_targetsÚweakrefÚWeakKeyDictionaryrzrkrrôÚ_mapper_registryrÈrŠr`r>rr=r·)rfrÚ other_propsÚ prop_to_fromrªr«r§s @r+rƒz0JoinCondition._warn_for_conflicting_sync_targetsÚ sø€ØÔ ð Ø ˆFð ð Ø-1Ô-Cð ñ ô ð ð Ø-1Ô-Mð ñ ô ñ ð5 Mñ5 M‰JˆE�3õ�3Ô#Ñ$Ô$ qÒ(Ð(Øà˜$Ô>Ð>Ð>õÔ-¨t¬y¸%Ð.@ÑAÔAðÔ4Øñðð!� Ø#ÔCÀCÔH� à+×1Ò1Ñ3Ô3ð 6ð 6‘G�B˜àœ ¥YÔ%?Ð?Ð?à œI×3Ò3°B´IÑ>Ô>ð@ð "×/Ò/°´ Ô0@ÑAÔAð@ð   uÐ,Ð,Ø d¤iÔ&AÐAÐAð$×*Ò*¨B°¨9Ñ5Ô5Ð5øàðÝ”I�Ið!œI˜I˜IØ!˜E˜EؘC˜CØ ŸIšIð&ð&ð&ð&à1<ð&ñ&ô&ñôðððñôðð"HM�Ô4°SÔ9¸$¼)ÑDÑDðk5 Mð5 Mr,có,—| d¦«Sr5©Ú_gather_join_annotationsr†s r+r¦zJoinCondition.remote_columns s€à×,Ò,¨XÑ6Ô6Ð6r,có,—| d¦«S)Nr#r´r†s r+r§zJoinCondition.local_columns s€à×,Ò,¨WÑ5Ô5Ð5r,có,—| d¦«Sr2r´r†s r+r©z!JoinCondition.foreign_key_columns" s€à×,Ò,¨YÑ7Ô7Ð7r,cóÔ—t| |j|¦«¦«}|j�.| | |j|¦«¦«d„|D¦«S)Ncó6—h|]}| ¦«’ŒSrèr•rŠs r+ú z9JoinCondition._gather_join_annotations..0 s €Ð+Ð+Ð+ A�— ’ ‘”Ð+Ð+Ð+r,)r_rƒrCrDÚupdate)rfr/Úss r+rµz&JoinCondition._gather_join_annotations& sy€Ý Ø × 0Ò 0°Ô1AÀ:Ñ NÔ Nñ ô ˆð Ô Ð )Ø �HŠHØ×4Ò4ØÔ&¨ ñôñ ô ð ð ,Ð+¨Ð+Ñ+Ô+Ð+r,có~‡—t‰¦«Štˆfd„tj|i¦«D¦«¦«S)NcóH•—g|]}‰ |j¦«¯|‘ŒSrè)Úissubsetr')rärÜr/s €r+ræzAJoinCondition._gather_columns_with_annotation..5 s@ø€ð ð ð àØ×&Ò& sÔ'7Ñ8Ô8ð Øð ð ð r,)r_rr.)rfrÑr/s `r+rƒz-JoinCondition._gather_columns_with_annotation2 sSø€Ý˜‘_”_ˆ Ýð ð ð ð å#Ô+¨F°BÑ7Ô7ð ñ ô ñ ô ð r,cóþ—t|ddi¦«}|j|j|j}}}|� |�||z}n||z}|�r<|�º| d¬¦«}t |t d¦«¬¦«}t ||j¬¦« |¦«} |�Et |t d¦«¬¦« t ||j ¬¦«¦«}|   |¦«}n_t |t d¦«|j¬¦«}|�7| t |t d ¦«|j ¬¦«¦«d} |  |¦«}| p|} d| _ nd} |||| |fS) a7Given a source and destination selectable, create a join between them. This takes into account aliasing the join clause to reference the appropriate corresponding columns in the target objects, as well as the extra child criterion, equivalent column sets, etc. r³TN)Úflatr#)Ú exclude_fn)Ú equivalents)rÂrÃr%) rrCrDrBr¸rÚ_ColInAnnotationsr�ÚchainrœrºrÂ) rfr�r±rærÄrCrDrBÚprimary_aliasizerÚsecondary_aliasizerršs r+råzJoinCondition.join_targets< sý€õ ,Ø Ð7¸Ð>ñ ô ˆð Ô Ø Ô Ø ŒNð%.�]ˆ ð Ð "ØÐ(Ø -° Ñ ;� � à)¨KÑ7� à ñ( "ØÐ$Ø%ŸOšO°˜OÑ6Ô6� Ý$1ØÕ*;¸GÑ*DÔ*Dð%ñ%ô%Ð!õ'4Ø#°Ô1Gð'ñ'ô'ç’%Ð)Ñ*Ô*ð$ð%Ð0Ý(5Ø!Õ.?ÀÑ.HÔ.Hð)ñ)ô)ç’eÝ%Ø-Ø(,Ô(?ðñôñôð&ð!4× <Ò <¸]Ñ KÔ K� � å$1Ø#Ý0°Ñ9Ô9Ø $Ô 6ð%ñ%ô%Ð!ð %Ð0Ø%×+Ò+Ý%Ø-Ý'8¸Ñ'BÔ'BØ(,Ô(?ðñôñôðð'+Ð#à+×4Ò4°[ÑAÔAˆKØ0ÐEÐ4EˆNØ(,ˆNÔ %Ð %à!ˆNà Ø Ø Ø Ø ð  ð r,cóD‡‡ ‡ ‡ —tj¦«Š tj¦«}|jduŠ ‰ rItjt ¦«Š |jD]'\}}‰ | ||f¦«|||<Œ(n'‰s|jD] \}}|||<Œ n|jD] \}}|||<Œ ˆ ˆ ˆ ˆfd„}|j}|j�‰stj |i|¦«}|j�4|j}‰rtj |i|¦«}tj ||¦«}ˆ fd„‰ D¦«}|||fS)Nc󜕗‰s d|jvs‰r=‰r|‰vs ‰s5d|jvr,|‰vr tjdd|jd¬¦«‰|<‰|SdS)Nr#r%T)r_rÕ)r'rrØrx)rÜÚbindsÚ has_secondaryÚlookuprs €€€€r+Ú col_to_bindz5JoinCondition.create_lazy_clause..col_to_bind¤ s“ø€ð'ð "Ø+2°cÔ6FÐ+FÐ+FØ$ð,Gð#ð,Gð(+¨f } }Ø)ð(5Ø.6¸#Ô:JÐ.JÐ.Jð˜eÐ#Ð#Ý!$¤Ø˜d¨#¬(¸4ð"ñ"ô"�E˜#‘Jð˜S”zÐ!Ø�4r,có,•—i|]}‰|j|“ŒSrè)rt)rärÜrÊs €r+ú z4JoinCondition.create_lazy_clause..à s!ø€Ð<Ð<Ð<¨s�u˜S”z”~ sÐ<Ð<ÐrCrr+rrì) rfrÚequated_columnsr rFrÍÚ lazywhererDr rÊrËrÌs ` @@@r+Úcreate_lazy_clausez JoinCondition.create_lazy_clause’ s©øøøø€ÝÔ Ñ"Ô"ˆÝÔ*Ñ,Ô,ˆàÔ*°$Ð6ˆ à ð 'Ý Ô,­TÑ2Ô2ˆFØÔ/ð 'ð '‘��1Ø�q” × Ò  ! Q Ñ(Ô(Ð(Ø%&� Ñ"Ð"ð 'ð#ð 'ØÔ/ð 'ð '‘��1Ø%&� Ñ"Ð"ð 'ðÔ/ð 'ð '‘��1Ø%&� Ñ"Ð"ð ð ð ð ð ð ð ð ð"Ô$ˆ Ø Ô Ð %Ð->Ð %Ý Ô5ؘ2˜{ñôˆIð Ô Ð )Ø Ô.ˆMØ ð Ý (Ô =Ø! 2 {ñ!ô!� õœ ¨MÑ:Ô:ˆIà<Ð<Ð<Ð<°eÐ<Ñ<Ô<ˆ à˜+ Ð6Ð6r,r‰)F).rørùrúr?rrýrürƒrÔrÓrrürÕr0r,r*rþr7r8rUrWrÿr[r]r\r^r_rhrrrrrr˜rr®r¯r­rƒr¦r§r©rµrƒrårÖrèr,r+r¢r¢» s6€€€€€ðØØØØØ!%ØØØØ ØØ(˜ð#/ð/ð/ð/ðb&Lð&Lð&LðPððð$gðgðgðRðNðNñ„XðNððPðPñ„XðPð Ôð :ð :ñÔð :ðDððð ÔðAðAñÔðAð Ôð@ð@ñÔð@ð )ð )ð )ð ð ð ð,ð,ð,ð\ððð0 ð ð ð9ð9ð9ð, ð ð ð" ð ð ð.ððð<- ð- ð- ð^ ð ð ð$ ð ð ð ð ð ð:  ð  ð  ð ð ð ð@,ð@,ð@,ðDRðRðRðhKðKðKð) ð) ð) ðV'@ gÔ&?Ñ&AÔ&AÐ#ð>Mð>Mð>Mð@ Ôð7ð7ñÔð7ð Ôð6ð6ñÔð6ð Ôð8ð8ñÔð8ð ,ð ,ð ,ð ð ð ðHLðT ðT ðT ðT ðl37ð37ð37ð37ð37ð37r,r¢có—eZdZdZd„Zd„ZdS)rÄzGSeralizable equivalent to: lambda c: "name" in c._annotations có—||_dSr‰)Úname)rfrÙs r+r?z_ColInAnnotations.__init__Î s €ØˆŒ ˆ ˆ r,có—|j|jvSr‰)rÙr')rfrMs r+Ú__call__z_ColInAnnotations.__call__Ñ s€ØŒy˜AœNÐ*Ð*r,N)rørùrúrûr?rÛrèr,r+rÄrÄÈ s<€€€€€ððð ððð+ð+ð+ð+ð+r,rÄ)3rûÚ __future__rrÑr®ÚrrrrôÚbaserr Ú interfacesr r r r rrrrrrrIrrrÚ inspectionrrrrÚsql.utilrrrrr r!r#r%r.Ú class_loggerÚ langhelpersÚdependency_forr1r'Úobjectr¢rÄrèr,r+úræs>ðððð'Ð&Ð&Ð&Ð&Ð&àÐÐÐØ€€€àÐÐÐÐÐØÐÐÐÐÐØ!Ð!Ð!Ð!Ð!Ð!Ø"Ð"Ð"Ð"Ð"Ð"ØÐÐÐÐÐØ"Ð"Ð"Ð"Ð"Ð"Ø!Ð!Ð!Ð!Ð!Ð!Ø!Ð!Ð!Ð!Ð!Ð!Ø&Ð&Ð&Ð&Ð&Ð&Ø+Ð+Ð+Ð+Ð+Ð+ØÐÐÐÐÐØ!Ð!Ð!Ð!Ð!Ð!Ø Ð Ð Ð Ð Ð ØÐÐÐÐÐØÐÐÐÐÐØÐÐÐÐÐØÐÐÐÐÐØÐÐÐÐÐØ Ð Ð Ð Ð Ð ØÐÐÐÐÐØÐÐÐÐÐØÐÐÐÐÐØ'Ð'Ð'Ð'Ð'Ð'Ø(Ð(Ð(Ð(Ð(Ð(Ø.Ð.Ð.Ð.Ð.Ð.Ø$Ð$Ð$Ð$Ð$Ð$Ø%Ð%Ð%Ð%Ð%Ð%Ø*Ð*Ð*Ð*Ð*Ð*Ø+Ð+Ð+Ð+Ð+Ð+ðððð&ððð(ÔØÔ× Ò Ð!<ÈÐ ÑNÔNðN% ðN% ðN% ðN% ðN% Ð.ñN% ôN% ñOÔNñÔðN% ðbJ ð ð ðJ7ðJ7ðJ7ðJ7ðJ7�FñJ7ôJ7ðJ7ðZ +ð +ð +ð +ð +˜ñ +ô +ð +ð +ð +r,