hooks/test/data-computed/schema.py
changeset 10192 365e5a0287d6
parent 9967 e65873ad0371
child 10480 770b58f99e66
--- a/hooks/test/data-computed/schema.py	Mon Feb 02 22:05:00 2015 +0100
+++ b/hooks/test/data-computed/schema.py	Mon Feb 02 23:17:15 2015 +0100
@@ -29,3 +29,18 @@
 class Societe(EntityType):
     nom = String()
     salaire_total = Int(formula='Any SUM(SA) GROUPBY X WHERE P travaille X, P salaire SA')
+
+
+class Agent(EntityType):
+    asalae_id = String(formula='Any E WHERE M mirror_of X, M extid E')
+
+class MirrorEntity(EntityType):
+    extid = String(required=True, unique=True,
+                   description=_('external identifier of the object'))
+
+
+class mirror_of(RelationDefinition):
+    subject  = 'MirrorEntity'
+    object = ('Agent', 'Societe')
+    cardinality = '?*'
+    inlined = True