[PATCH 3 of 6 eac] Backed out a58604591069

Denis Laxalde denis.laxalde at logilab.fr
Tue Oct 30 11:14:55 CET 2018


# HG changeset patch
# User Denis Laxalde <denis.laxalde at logilab.fr>
# Date 1540888110 -3600
#      Tue Oct 30 09:28:30 2018 +0100
# Node ID ca1c38997c629cffc8ffa2f9a7796bf2843f7d18
# Parent  dbdcb8cedb3f4d7ea2956980dff474942add6ac4
# Available At http://hg.logilab.org/review/cubes/eac
#              hg pull http://hg.logilab.org/review/cubes/eac -r ca1c38997c62
Backed out a58604591069

Change introduced in a58604591069 (making ternary relations composite on
the "object") is actually semantically wrong; I didn't remember this at
the time I wrote the patch while trying to solve the issue of deleting
an AuthorityRecord with such relations.

diff --git a/cubicweb_eac/migration/0.8.0_Any.py b/cubicweb_eac/migration/0.8.0_Any.py
--- a/cubicweb_eac/migration/0.8.0_Any.py
+++ b/cubicweb_eac/migration/0.8.0_Any.py
@@ -1,11 +1,1 @@
-for rtype in (
-    'association_from',
-    'association_to',
-    'chronological_predecessor',
-    'chronological_successor',
-    'hierarchical_parent',
-    'hierarchical_child',
-):
-    sync_schema_props_perms(rtype)
-
 sync_schema_props_perms('has_citation')
diff --git a/cubicweb_eac/schema.py b/cubicweb_eac/schema.py
--- a/cubicweb_eac/schema.py
+++ b/cubicweb_eac/schema.py
@@ -185,7 +185,6 @@ class _agent_relation(RelationDefinition
     object = ('AuthorityRecord', 'ExternalUri')
     cardinality = '1*'
     inlined = True
-    composite = 'object'
 
 
 @xml_wrap
diff --git a/test/test_schema.py b/test/test_schema.py
--- a/test/test_schema.py
+++ b/test/test_schema.py
@@ -99,14 +99,6 @@ class AuthorityRecordGraphTC(CubicWebTC)
         expected = {
             'AgentFunction': {('function_agent', 'subject'): set(['AuthorityRecord'])},
             'AgentPlace': {('place_agent', 'subject'): set(['AuthorityRecord'])},
-            'AssociationRelation': {
-                ('association_from', 'subject'): set(['AuthorityRecord']),
-                ('association_to', 'subject'): set(['AuthorityRecord']),
-            },
-            'ChronologicalRelation': {
-                ('chronological_predecessor', 'subject'): set(['AuthorityRecord']),
-                ('chronological_successor', 'subject'): set(['AuthorityRecord']),
-            },
             'Citation': {('has_citation', 'object'): set([
                 'GeneralContext', 'Mandate', 'Occupation', 'AgentFunction',
                 'AgentPlace', 'History', 'LegalStatus',
@@ -117,10 +109,6 @@ class AuthorityRecordGraphTC(CubicWebTC)
                                     set(['AuthorityRecord'])},
             'EACSource': {('source_agent', 'subject'): set(['AuthorityRecord'])},
             'GeneralContext': {('general_context_of', 'subject'): set(['AuthorityRecord'])},
-            'HierarchicalRelation': {
-                ('hierarchical_child', 'subject'): set(['AuthorityRecord']),
-                ('hierarchical_parent', 'subject'): set(['AuthorityRecord']),
-            },
             'History': {('history_agent', 'subject'): set(['AuthorityRecord'])},
             'LegalStatus': {('legal_status_agent', 'subject'): set(['AuthorityRecord'])},
             'Mandate': {('mandate_agent', 'subject'): set(['AuthorityRecord'])},



More information about the saem-devel mailing list