hooks/test/data/schema.py
changeset 9548 be001628edad
parent 9361 0542a85fe667
child 10387 67890235cb78
--- a/hooks/test/data/schema.py	Fri Jan 24 13:08:53 2014 +0100
+++ b/hooks/test/data/schema.py	Tue Jan 21 18:30:16 2014 +0100
@@ -1,4 +1,4 @@
-# copyright 2003-2013 LOGILAB S.A. (Paris, FRANCE), all rights reserved.
+# copyright 2003-2014 LOGILAB S.A. (Paris, FRANCE), all rights reserved.
 # contact http://www.logilab.fr/ -- mailto:contact@logilab.fr
 #
 # This file is part of CubicWeb.
@@ -16,10 +16,23 @@
 # You should have received a copy of the GNU Lesser General Public License along
 # with CubicWeb.  If not, see <http://www.gnu.org/licenses/>.
 
-from yams.buildobjs import RelationDefinition
+from yams.buildobjs import RelationDefinition, EntityType, String
 
 class friend(RelationDefinition):
     subject = ('CWUser', 'CWGroup')
     object = ('CWUser', 'CWGroup')
     symmetric = True
 
+class Folder(EntityType):
+    name = String()
+
+class parent(RelationDefinition):
+    subject = 'Folder'
+    object = 'Folder'
+    composite = 'object'
+    cardinality = '?*'
+
+class children(RelationDefinition):
+    subject = 'Folder'
+    object = 'Folder'
+    composite = 'subject'