web/test/data/schema.py
changeset 5386 4c92202ab130
parent 4252 6c4f109c2b03
child 5423 e15abfdcce38
--- a/web/test/data/schema.py	Fri Apr 23 12:42:53 2010 +0200
+++ b/web/test/data/schema.py	Fri Apr 23 13:25:02 2010 +0200
@@ -6,8 +6,7 @@
 :license: GNU Lesser General Public License, v2.1 - http://www.gnu.org/licenses
 """
 
-from yams.buildobjs import (EntityType, RelationType, RelationDefinition,
-                            SubjectRelation, ObjectRelation,
+from yams.buildobjs import (EntityType, RelationDefinition, SubjectRelation,
                             String, Int, Datetime, Boolean, Float)
 from yams.constraints import IntervalBoundConstraint
 
@@ -20,7 +19,7 @@
     subject = 'Tag'
     object = ('BlogEntry', 'CWUser')
 
-class checked_by(RelationType):
+class checked_by(RelationDefinition):
     subject = 'BlogEntry'
     object = 'CWUser'
     cardinality = '?*'
@@ -45,7 +44,10 @@
     description = String()
     salary = Float()
     travaille = SubjectRelation('Societe')
-    connait = ObjectRelation('CWUser')
+
+class connait(RelationDefinition):
+    subject = 'CWUser'
+    object = 'Personne'
 
 class Societe(EntityType):
     nom  = String(maxsize=64, fulltextindexed=True)