server/test/data/schema/custom.py
author sylvain.thenault@logilab.fr
Mon, 06 Apr 2009 16:11:38 +0200
changeset 1250 5c20a7f13c84
parent 393 45a675515427
child 1398 5fe84a5f7035
permissions -rw-r--r--
new recreate argument to extid2eid when an external source want to recreate entities previously imported with a predictable ext id
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
0
b97547f5f1fa Showtime !
Adrien Di Mascio <Adrien.DiMascio@logilab.fr>
parents:
diff changeset
     1
b97547f5f1fa Showtime !
Adrien Di Mascio <Adrien.DiMascio@logilab.fr>
parents:
diff changeset
     2
b97547f5f1fa Showtime !
Adrien Di Mascio <Adrien.DiMascio@logilab.fr>
parents:
diff changeset
     3
class test(AttributeRelationType):
b97547f5f1fa Showtime !
Adrien Di Mascio <Adrien.DiMascio@logilab.fr>
parents:
diff changeset
     4
    permissions = {'read': ('managers', 'users', 'guests'),
b97547f5f1fa Showtime !
Adrien Di Mascio <Adrien.DiMascio@logilab.fr>
parents:
diff changeset
     5
                   'delete': ('managers',),
b97547f5f1fa Showtime !
Adrien Di Mascio <Adrien.DiMascio@logilab.fr>
parents:
diff changeset
     6
                   'add': ('managers',)}
332
86b8d58664eb backport msplanner test from cubicweb-multisources
Sylvain Thenault <sylvain.thenault@logilab.fr>
parents: 0
diff changeset
     7
86b8d58664eb backport msplanner test from cubicweb-multisources
Sylvain Thenault <sylvain.thenault@logilab.fr>
parents: 0
diff changeset
     8
class fiche(RelationType):
86b8d58664eb backport msplanner test from cubicweb-multisources
Sylvain Thenault <sylvain.thenault@logilab.fr>
parents: 0
diff changeset
     9
    inlined = True
86b8d58664eb backport msplanner test from cubicweb-multisources
Sylvain Thenault <sylvain.thenault@logilab.fr>
parents: 0
diff changeset
    10
    subject = 'Personne'
86b8d58664eb backport msplanner test from cubicweb-multisources
Sylvain Thenault <sylvain.thenault@logilab.fr>
parents: 0
diff changeset
    11
    object = 'Card'
86b8d58664eb backport msplanner test from cubicweb-multisources
Sylvain Thenault <sylvain.thenault@logilab.fr>
parents: 0
diff changeset
    12
    cardinality = '??'
86b8d58664eb backport msplanner test from cubicweb-multisources
Sylvain Thenault <sylvain.thenault@logilab.fr>
parents: 0
diff changeset
    13
86b8d58664eb backport msplanner test from cubicweb-multisources
Sylvain Thenault <sylvain.thenault@logilab.fr>
parents: 0
diff changeset
    14
class multisource_rel(RelationDefinition):
86b8d58664eb backport msplanner test from cubicweb-multisources
Sylvain Thenault <sylvain.thenault@logilab.fr>
parents: 0
diff changeset
    15
    subject = ('Card', 'Note')
86b8d58664eb backport msplanner test from cubicweb-multisources
Sylvain Thenault <sylvain.thenault@logilab.fr>
parents: 0
diff changeset
    16
    object = 'Note'
86b8d58664eb backport msplanner test from cubicweb-multisources
Sylvain Thenault <sylvain.thenault@logilab.fr>
parents: 0
diff changeset
    17
393
45a675515427 cross_relations support
sylvain.thenault@logilab.fr
parents: 360
diff changeset
    18
class multisource_crossed_rel(RelationDefinition):
45a675515427 cross_relations support
sylvain.thenault@logilab.fr
parents: 360
diff changeset
    19
    subject = ('Card', 'Note')
45a675515427 cross_relations support
sylvain.thenault@logilab.fr
parents: 360
diff changeset
    20
    object = 'Note'
45a675515427 cross_relations support
sylvain.thenault@logilab.fr
parents: 360
diff changeset
    21
341
0a426be2f3a2 fixes for some cases of neged inlined relations, may have to use (new) IntersectStep. XXX: write IntersectFetchStep
Sylvain Thenault <sylvain.thenault@logilab.fr>
parents: 332
diff changeset
    22
class multisource_inlined_rel(RelationType):
0a426be2f3a2 fixes for some cases of neged inlined relations, may have to use (new) IntersectStep. XXX: write IntersectFetchStep
Sylvain Thenault <sylvain.thenault@logilab.fr>
parents: 332
diff changeset
    23
    inlined = True
0a426be2f3a2 fixes for some cases of neged inlined relations, may have to use (new) IntersectStep. XXX: write IntersectFetchStep
Sylvain Thenault <sylvain.thenault@logilab.fr>
parents: 332
diff changeset
    24
    cardinality = '?*'
0a426be2f3a2 fixes for some cases of neged inlined relations, may have to use (new) IntersectStep. XXX: write IntersectFetchStep
Sylvain Thenault <sylvain.thenault@logilab.fr>
parents: 332
diff changeset
    25
    subject = ('Card', 'Note')
0a426be2f3a2 fixes for some cases of neged inlined relations, may have to use (new) IntersectStep. XXX: write IntersectFetchStep
Sylvain Thenault <sylvain.thenault@logilab.fr>
parents: 332
diff changeset
    26
    object = ('Affaire', 'Note')
0a426be2f3a2 fixes for some cases of neged inlined relations, may have to use (new) IntersectStep. XXX: write IntersectFetchStep
Sylvain Thenault <sylvain.thenault@logilab.fr>
parents: 332
diff changeset
    27
332
86b8d58664eb backport msplanner test from cubicweb-multisources
Sylvain Thenault <sylvain.thenault@logilab.fr>
parents: 0
diff changeset
    28
86b8d58664eb backport msplanner test from cubicweb-multisources
Sylvain Thenault <sylvain.thenault@logilab.fr>
parents: 0
diff changeset
    29
class see_also(RelationDefinition):
86b8d58664eb backport msplanner test from cubicweb-multisources
Sylvain Thenault <sylvain.thenault@logilab.fr>
parents: 0
diff changeset
    30
    subject = ('Bookmark', 'Note')
86b8d58664eb backport msplanner test from cubicweb-multisources
Sylvain Thenault <sylvain.thenault@logilab.fr>
parents: 0
diff changeset
    31
    object = ('Bookmark', 'Note')
360
600dd2fe8b40 backport unittest_ldapuser
Sylvain Thenault <sylvain.thenault@logilab.fr>
parents: 341
diff changeset
    32
600dd2fe8b40 backport unittest_ldapuser
Sylvain Thenault <sylvain.thenault@logilab.fr>
parents: 341
diff changeset
    33
_euser = import_schema('base').EUser
600dd2fe8b40 backport unittest_ldapuser
Sylvain Thenault <sylvain.thenault@logilab.fr>
parents: 341
diff changeset
    34
_euser.__relations__[0].fulltextindexed = True