[
https://issues.apache.org/jira/browse/ARIA-132?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15944983#comment-15944983
]
ASF GitHub Bot commented on ARIA-132:
-------------------------------------
Github user mxmrlv commented on a diff in the pull request:
https://github.com/apache/incubator-ariatosca/pull/84#discussion_r108393478
--- Diff: aria/modeling/relationship.py ---
@@ -114,28 +105,24 @@ def one_to_many_self(model_class,
:param dict_key: If set the value will be a dict with this key as the
dict key; otherwise will
be a list
:type dict_key: basestring
- :param relationship_kwargs: Extra kwargs for SQLAlchemy
``relationship``
- :type relationship_kwargs: {}
"""
-
- relationship_kwargs = relationship_kwargs or {}
-
- relationship_kwargs.setdefault('remote_side',
'{model_class}.{remote_column}'.format(
- model_class=model_class.__name__,
- remote_column=fk
- ))
-
- return _relationship(model_class, model_class.__tablename__, None,
relationship_kwargs,
- other_property=False, dict_key=dict_key)
+ return _relationship(
+ model_class,
+ model_class.__tablename__,
+ relationship_kwargs={
+ 'remote_side': '{model_class}.{remote_column}'.format(
+ model_class=model_class.__name__, remote_column=fk)
+ },
+ back_populates=False,
+ dict_key=dict_key
+ )
def one_to_one(model_class,
other_table,
fk=None,
other_fk=None,
- other_property=None,
- relationship_kwargs=None,
- backref_kwargs=None):
+ back_populates=None):
--- End diff --
add NO_BACK_POP const (instead of False)
> Models cascading deletion raises constraint errors
> --------------------------------------------------
>
> Key: ARIA-132
> URL: https://issues.apache.org/jira/browse/ARIA-132
> Project: AriaTosca
> Issue Type: Bug
> Reporter: Ran Ziv
> Assignee: Maxim Orlov
> Priority: Critical
>
> Models whose deletion should cascade to additional models currently don't
> behave this way and instead raise constraint errors
--
This message was sent by Atlassian JIRA
(v6.3.15#6346)