rename internal entity types to have CW prefix instead of E tls-sprint
authorsylvain.thenault@logilab.fr
Fri, 17 Apr 2009 16:55:37 +0200
branchtls-sprint
changeset 1398 5fe84a5f7035
parent 1397 6cbc7bc8ea6d
child 1399 3f408c7a164e
rename internal entity types to have CW prefix instead of E
__init__.py
__pkginfo__.py
appobject.py
common/test/unittest_mixins.py
common/test/unittest_rest.py
dbapi.py
devtools/_apptest.py
devtools/apptest.py
devtools/fill.py
devtools/test/data/schema/relations.rel
devtools/test/unittest_testlib.py
doc/book/en/A03a-concepts.en.txt
doc/book/en/B0011-schema-stdlib.en.txt
doc/book/en/B0012-schema-definition.en.txt
doc/book/en/B0020-define-workflows.en.txt
doc/book/en/B1070-ui-components.en.txt
doc/book/en/C030-instance-config.en.txt
doc/book/en/D070-cookbook.en.txt
doc/book/en/MERGE_ME-tut-create-app.en.txt
doc/book/fr/02-foundation.fr.txt
doc/book/fr/04-01-schema-stdlib.fr.txt
doc/book/fr/04-02-schema-definition.fr.txt
doc/book/fr/06-define-workflows.fr.txt
doc/book/fr/09-instance-config.fr.txt
doc/book/fr/12-ui-components.fr.txt
doc/book/fr/MERGE_ME-tut-create-app.fr.txt
entities/__init__.py
entities/authobjs.py
entities/lib.py
entities/schemaobjs.py
entities/test/unittest_base.py
goa/appobjects/dbmgmt.py
goa/appobjects/gauthservice.py
goa/dbinit.py
goa/dbmyams.py
goa/doc/devmanual_fr/chap_autres_composants_ui.txt
goa/doc/devmanual_fr/chap_bases_framework_erudi.txt
goa/doc/devmanual_fr/chap_configuration_instance.txt
goa/doc/devmanual_fr/sect_definition_schema.txt
goa/doc/devmanual_fr/sect_stdlib_schemas.txt
goa/gaesource.py
goa/test/unittest_db.py
goa/test/unittest_editcontroller.py
goa/test/unittest_metadata.py
goa/test/unittest_rql.py
goa/test/unittest_schema.py
goa/testlib.py
i18n/en.po
i18n/es.po
i18n/fr.po
misc/migration/2.42.1_Any.py
misc/migration/2.44.0_Any.py
misc/migration/2.48.8_Any.py
misc/migration/2.99.0_Any.py
misc/migration/3.2.0_Any.py
misc/migration/bootstrapmigration_repository.py
misc/migration/postcreate.py
rset.py
schema.py
schemas/Bookmark.py
schemas/base.py
schemas/bootstrap.py
schemas/workflow.py
server/__init__.py
server/checkintegrity.py
server/hooks.py
server/migractions.py
server/msplanner.py
server/repository.py
server/schemahooks.py
server/schemaserial.py
server/sources/__init__.py
server/sources/ldapuser.py
server/sources/native.py
server/sources/pyrorql.py
server/sources/rql2sql.py
server/test/data/migrschema/relations.rel
server/test/data/schema/Affaire.py
server/test/data/schema/custom.py
server/test/data/schema/relations.rel
server/test/unittest_hookhelper.py
server/test/unittest_hooks.py
server/test/unittest_hooksmanager.py
server/test/unittest_ldapuser.py
server/test/unittest_migractions.py
server/test/unittest_msplanner.py
server/test/unittest_multisources.py
server/test/unittest_querier.py
server/test/unittest_repository.py
server/test/unittest_rql2sql.py
server/test/unittest_rqlannotation.py
server/test/unittest_rqlrewrite.py
server/test/unittest_schemaserial.py
server/test/unittest_security.py
server/test/unittest_session.py
server/test/unittest_ssplanner.py
skeleton/migration/precreate.py
sobjects/hooks.py
sobjects/notification.py
sobjects/supervising.py
sobjects/test/data/sobjects/__init__.py
sobjects/test/unittest_notification.py
sobjects/test/unittest_supervising.py
test/data/schema.py
test/unittest_dbapi.py
test/unittest_entity.py
test/unittest_rset.py
test/unittest_schema.py
web/test/data/schema/relations.rel
web/test/data/schema/testschema.py
web/test/test_views.py
web/test/unittest_application.py
web/test/unittest_form.py
web/test/unittest_formfields.py
web/test/unittest_magicsearch.py
web/test/unittest_urlpublisher.py
web/test/unittest_urlrewrite.py
web/test/unittest_views_actions.py
web/test/unittest_views_basecontrollers.py
web/test/unittest_views_baseforms.py
web/test/unittest_views_baseviews.py
web/test/unittest_views_editforms.py
web/test/unittest_views_navigation.py
web/test/unittest_views_searchrestriction.py
web/test/unittest_viewselector.py
web/test/unittest_widgets.py
web/views/actions.py
web/views/basecontrollers.py
web/views/calendar.py
web/views/eproperties.py
web/views/euser.py
web/views/management.py
web/views/schema.py
web/views/startup.py
web/views/urlrewrite.py
web/views/vcard.py
web/views/workflow.py
web/wdoc/tut_rql_en.rst
web/wdoc/tut_rql_fr.rst
--- a/__init__.py	Fri Apr 17 13:21:05 2009 +0200
+++ b/__init__.py	Fri Apr 17 16:55:37 2009 +0200
@@ -212,16 +212,29 @@
         
 
 # XXX 2.45 is allowing nicer entity type names, use this map for bw compat    
-ETYPE_NAME_MAP = {'Eetype': 'EEType',
-                  'Ertype': 'ERType',
-                  'Efrdef': 'EFRDef',
-                  'Enfrdef': 'ENFRDef',
-                  'Econstraint': 'EConstraint',
-                  'Econstrainttype': 'EConstraintType',
-                  'Epermission': 'EPermission',
-                  'Egroup': 'EGroup',
-                  'Euser': 'EUser',
-                  'Eproperty': 'EProperty',
+ETYPE_NAME_MAP = {# 3.2 migration
+                  'ECache': 'CWCache',
+                  'EUser': 'CWUser',
+                  'EGroup': 'CWGroup',
+                  'EProperty': 'CWProperty',
+                  'EFRDef': 'CWAttribute',
+                  'ENFRDef': 'CWRelation',
+                  'ERType': 'CWRType',
+                  'EEType': 'CWEType',
+                  'EConstraintType': 'CWConstraintType',
+                  'EConstraint': 'CWConstraint',
+                  'EPermission': 'CWPermission',
+                   # 2.45 migration
+                  'Eetype': 'CWEType',
+                  'Ertype': 'CWRType',
+                  'Efrdef': 'CWAttribute',
+                  'Enfrdef': 'CWRelation',
+                  'Econstraint': 'CWConstraint',
+                  'Econstrainttype': 'CWConstraintType',
+                  'Epermission': 'CWPermission',
+                  'Egroup': 'CWGroup',
+                  'Euser': 'CWUser',
+                  'Eproperty': 'CWProperty',
                   'Emailaddress': 'EmailAddress',
                   'Rqlexpression': 'RQLExpression',
                   'Trinfo': 'TrInfo',
@@ -269,11 +282,6 @@
                     'agueol': 'agueol',
                     'docaster': 'docaster',
                     'asteretud': 'asteretud',
-                    
-                    # XXX temp
-                    'keywords': 'keyword',
-                    'folders': 'folder',
-                    'tags': 'tag',
                     }
 
 def neg_role(role):
--- a/__pkginfo__.py	Fri Apr 17 13:21:05 2009 +0200
+++ b/__pkginfo__.py	Fri Apr 17 16:55:37 2009 +0200
@@ -6,7 +6,7 @@
 distname = "cubicweb"
 modname = "cubicweb"
 
-numversion = (3, 1, 4)
+numversion = (3, 2, 0)
 version = '.'.join(str(num) for num in numversion)
 
 license = 'LGPL v2'
--- a/appobject.py	Fri Apr 17 13:21:05 2009 +0200
+++ b/appobject.py	Fri Apr 17 16:55:37 2009 +0200
@@ -77,7 +77,7 @@
         return cls(*args, **kwargs)
 
     # Eproperties definition:
-    # key: id of the property (the actual EProperty key is build using
+    # key: id of the property (the actual CWProperty key is build using
     #      <registry name>.<obj id>.<property id>
     # value: tuple (property type, vocabfunc, default value, property description)
     #        possible types are those used by `logilab.common.configuration`
@@ -132,7 +132,7 @@
             CACHE_REGISTRY[cachename] = cache
         _now = datetime.now()
         if _now > cache.latest_cache_lookup + ONESECOND:
-            ecache = self.req.execute('Any C,T WHERE C is ECache, C name %(name)s, C timestamp T', 
+            ecache = self.req.execute('Any C,T WHERE C is CWCache, C name %(name)s, C timestamp T', 
                                       {'name':cachename}).get_entity(0,0)
             cache.latest_cache_lookup = _now
             if not ecache.valid(cache.cache_creation_date):
--- a/common/test/unittest_mixins.py	Fri Apr 17 13:21:05 2009 +0200
+++ b/common/test/unittest_mixins.py	Fri Apr 17 16:55:37 2009 +0200
@@ -7,14 +7,14 @@
         self.execute('SET X state_of ET WHERE ET name "Bookmark", X eid %(x)s',
                      {'x': s.eid})
         es = self.user().wf_state('activated')
-        self.assertEquals(es.state_of[0].name, 'EUser')
+        self.assertEquals(es.state_of[0].name, 'CWUser')
         
     def test_wf_transition(self):
         t = self.add_entity('Transition', name=u'deactivate')
         self.execute('SET X transition_of ET WHERE ET name "Bookmark", X eid %(x)s',
                      {'x': t.eid})
         et = self.user().wf_transition('deactivate')
-        self.assertEquals(et.transition_of[0].name, 'EUser')
+        self.assertEquals(et.transition_of[0].name, 'CWUser')
 
     def test_change_state(self):
         user = self.user()
--- a/common/test/unittest_rest.py	Fri Apr 17 13:21:05 2009 +0200
+++ b/common/test/unittest_rest.py	Fri Apr 17 16:55:37 2009 +0200
@@ -5,7 +5,7 @@
         
 class RestTC(EnvBasedTC):
     def context(self):
-        return self.execute('EUser X WHERE X login "admin"').get_entity(0, 0)
+        return self.execute('CWUser X WHERE X login "admin"').get_entity(0, 0)
     
     def test_eid_role(self):
         context = self.context()
--- a/dbapi.py	Fri Apr 17 13:21:05 2009 +0200
+++ b/dbapi.py	Fri Apr 17 16:55:37 2009 +0200
@@ -430,9 +430,9 @@
         eid, login, groups, properties = self._repo.user_info(self.sessionid, props)
         if req is None:
             req = self.request()
-        rset = req.eid_rset(eid, 'EUser')
-        user = self.vreg.etype_class('EUser')(req, rset, row=0, groups=groups,
-                                              properties=properties)
+        rset = req.eid_rset(eid, 'CWUser')
+        user = self.vreg.etype_class('CWUser')(req, rset, row=0, groups=groups,
+                                               properties=properties)
         user['login'] = login # cache login
         return user
 
--- a/devtools/_apptest.py	Fri Apr 17 13:21:05 2009 +0200
+++ b/devtools/_apptest.py	Fri Apr 17 16:55:37 2009 +0200
@@ -21,10 +21,10 @@
 from cubicweb.devtools import ApptestConfiguration, init_test_database
 from cubicweb.devtools.fake import FakeRequest
     
-SYSTEM_ENTITIES = ('EGroup', 'EUser',
-                   'EFRDef', 'ENFRDef',
-                   'EConstraint', 'EConstraintType', 'EProperty',
-                   'EEType', 'ERType',
+SYSTEM_ENTITIES = ('CWGroup', 'CWUser',
+                   'CWAttribute', 'CWRelation',
+                   'CWConstraint', 'CWConstraintType', 'CWProperty',
+                   'CWEType', 'CWRType',
                    'State', 'Transition', 'TrInfo',
                    'RQLExpression',
                    )
@@ -50,7 +50,7 @@
                     )
 
 def unprotected_entities(app_schema, strict=False):
-    """returned a Set of each non final entity type, excluding EGroup, and EUser...
+    """returned a Set of each non final entity type, excluding CWGroup, and CWUser...
     """
     if strict:
         protected_entities = yams.schema.BASE_TYPES
@@ -90,7 +90,7 @@
         schema = self.vreg.schema
         # else we may run into problems since email address are ususally share in app tests
         # XXX should not be necessary anymore
-        schema.rschema('primary_email').set_rproperty('EUser', 'EmailAddress', 'composite', False)
+        schema.rschema('primary_email').set_rproperty('CWUser', 'EmailAddress', 'composite', False)
         self.deletable_entities = unprotected_entities(schema)
 
     def restore_database(self):
@@ -119,7 +119,7 @@
     def create_user(self, login, groups=('users',), req=None):
         req = req or self.create_request()
         cursor = self._orig_cnx.cursor(req)
-        rset = cursor.execute('INSERT EUser X: X login %(login)s, X upassword %(passwd)s,'
+        rset = cursor.execute('INSERT CWUser X: X login %(login)s, X upassword %(passwd)s,'
                               'X in_state S WHERE S name "activated"',
                               {'login': unicode(login), 'passwd': login.encode('utf8')})
         user = rset.get_entity(0, 0)
--- a/devtools/apptest.py	Fri Apr 17 13:21:05 2009 +0200
+++ b/devtools/apptest.py	Fri Apr 17 16:55:37 2009 +0200
@@ -355,7 +355,7 @@
     def create_user(self, user, groups=('users',), password=None, commit=True):
         if password is None:
             password = user
-        eid = self.execute('INSERT EUser X: X login %(x)s, X upassword %(p)s,'
+        eid = self.execute('INSERT CWUser X: X login %(x)s, X upassword %(p)s,'
                             'X in_state S WHERE S name "activated"',
                             {'x': unicode(user), 'p': password})[0][0]
         groups = ','.join(repr(group) for group in groups)
--- a/devtools/fill.py	Fri Apr 17 13:21:05 2009 +0200
+++ b/devtools/fill.py	Fri Apr 17 16:55:37 2009 +0200
@@ -236,7 +236,7 @@
                         returns acceptable values for this attribute
     """
     # XXX HACK, remove or fix asap
-    if etype in (('String', 'Int', 'Float', 'Boolean', 'Date', 'EGroup', 'EUser')):
+    if etype in (('String', 'Int', 'Float', 'Boolean', 'Date', 'CWGroup', 'CWUser')):
         return []
     queries = []
     for index in xrange(entity_num):
--- a/devtools/test/data/schema/relations.rel	Fri Apr 17 13:21:05 2009 +0200
+++ b/devtools/test/data/schema/relations.rel	Fri Apr 17 16:55:37 2009 +0200
@@ -23,11 +23,11 @@
 Project uses Project
 
 Version version_of Project inline
-Version todo_by EUser
+Version todo_by CWUser
 
 Comment about Bug inline
 Comment about Story inline
 Comment about Comment inline
 
-EUser interested_in Project
+CWUser interested_in Project
 
--- a/devtools/test/unittest_testlib.py	Fri Apr 17 13:21:05 2009 +0200
+++ b/devtools/test/unittest_testlib.py	Fri Apr 17 16:55:37 2009 +0200
@@ -24,7 +24,7 @@
                 self.view('raising', self.execute('Bug B'), template=None)
             
             def test_correct_view(self):
-                self.view('primary', self.execute('EUser U'), template=None)
+                self.view('primary', self.execute('CWUser U'), template=None)
             
         tests = [MyWebTest('test_error_view'), MyWebTest('test_correct_view')]
         result = self.runner.run(TestSuite(tests))
--- a/doc/book/en/A03a-concepts.en.txt	Fri Apr 17 13:21:05 2009 +0200
+++ b/doc/book/en/A03a-concepts.en.txt	Fri Apr 17 16:55:37 2009 +0200
@@ -267,7 +267,7 @@
   * `set_header(header, value)`, adds an arbitrary header in the response
   * `cursor()` returns a RQL cursor on the session
   * `execute(*args, **kwargs)`, shortcut to ``.cursor().execute()``
-  * `property_value(key)`, properties management (`EProperty`)
+  * `property_value(key)`, properties management (`CWProperty`)
   * dictionary `data` to store data to share informations between components
     *while a request is executed*
 
--- a/doc/book/en/B0011-schema-stdlib.en.txt	Fri Apr 17 13:21:05 2009 +0200
+++ b/doc/book/en/B0011-schema-stdlib.en.txt	Fri Apr 17 16:55:37 2009 +0200
@@ -12,10 +12,10 @@
 ``````````````
 The available system entities are:
 
-* `EUser`, system users
-* `EGroup`, users groups
-* `EEType`, entity type
-* `ERType`, relation type
+* `CWUser`, system users
+* `CWGroup`, users groups
+* `CWEType`, entity type
+* `CWRType`, relation type
 
 * `State`, workflow state
 * `Transition`, workflow transition
@@ -24,8 +24,8 @@
 * `EmailAddress`, email address, used by the system to send notifications
   to the users and also used by others optionnals schemas
 
-* `EProperty`, used to configure the application
-* `EPermission`, used to configure the security of the application
+* `CWProperty`, used to configure the application
+* `CWPermission`, used to configure the security of the application
 
 * `Card`, generic documenting card
 * `Bookmark`, an entity type used to allow a user to customize his links within
--- a/doc/book/en/B0012-schema-definition.en.txt	Fri Apr 17 13:21:05 2009 +0200
+++ b/doc/book/en/B0012-schema-definition.en.txt	Fri Apr 17 16:55:37 2009 +0200
@@ -36,12 +36,12 @@
   
   - `modification_date` (`Datetime`)
   
-  - `created_by` (`EUser`) (which user created the entity)
+  - `created_by` (`CWUser`) (which user created the entity)
   
-  - `owned_by` (`EUser`) (to whom the entity belongs; by default the 
+  - `owned_by` (`CWUser`) (to whom the entity belongs; by default the 
      creator but not necessary, and it could have multiple owners)
      
-  - `is` (`EEType`)
+  - `is` (`CWEType`)
 
 
 * relations can be defined by using `ObjectRelation` or `SubjectRelation`.
@@ -165,7 +165,7 @@
     inlined = True
     cardinality = '?*'
     subject = '*'
-    object = 'EUser'
+    object = 'CWUser'
 
 In addition to the permissions, the properties of the relation types
 (shared also by all definition of relation of this type) are :
@@ -290,15 +290,15 @@
   - the permissions `add` and `delete` are equivalent. Only `add`/`read`
     are actually taken in consideration.
 
-In addition to that the entity type `EPermission` from the standard library
+In addition to that the entity type `CWPermission` from the standard library
 allow to build very complex and dynamic security architecture. The schema of
 this entity type is as follow : ::
 
-    class EPermission(MetaEntityType):
+    class CWPermission(MetaEntityType):
 	"""entity type that may be used to construct some advanced security configuration
 	"""
 	name = String(required=True, indexed=True, internationalizable=True, maxsize=100)
-	require_group = SubjectRelation('EGroup', cardinality='+*',
+	require_group = SubjectRelation('CWGroup', cardinality='+*',
 					description=_('groups to which the permission is granted'))
 	require_state = SubjectRelation('State',
 				    description=_("entity'state in which the permission is applyable"))
@@ -338,14 +338,14 @@
 		       }
 	inlined = True
 
-This configuration indicates that an entity `EPermission` named
+This configuration indicates that an entity `CWPermission` named
 "add_version" can be associated to a project and provides rights to create
 new versions on this project to specific groups. It is important to notice that :
 
 * in such case, we have to protect both the entity type "Version" and the relation
   associating a version to a project ("version_of")
 
-* because of the genricity of the entity type `EPermission`, we have to execute
+* because of the genricity of the entity type `CWPermission`, we have to execute
   a unification with the groups and/or the states if necessary in the expression
   ("U in_group G, P require_group G" in the above example)
 
--- a/doc/book/en/B0020-define-workflows.en.txt	Fri Apr 17 13:21:05 2009 +0200
+++ b/doc/book/en/B0020-define-workflows.en.txt	Fri Apr 17 16:55:37 2009 +0200
@@ -69,7 +69,7 @@
   
   _ = unicode
 
-  moderators = add_entity('EGroup', name=u"moderators")
+  moderators = add_entity('CWGroup', name=u"moderators")
 
 This adds the `moderators` user group.
 
--- a/doc/book/en/B1070-ui-components.en.txt	Fri Apr 17 13:21:05 2009 +0200
+++ b/doc/book/en/B1070-ui-components.en.txt	Fri Apr 17 16:55:37 2009 +0200
@@ -9,6 +9,6 @@
 ---------------------
 XXXFILLME
 
-EProperty
+CWProperty
 ---------
 XXXFILLME
--- a/doc/book/en/C030-instance-config.en.txt	Fri Apr 17 13:21:05 2009 +0200
+++ b/doc/book/en/C030-instance-config.en.txt	Fri Apr 17 16:55:37 2009 +0200
@@ -30,7 +30,7 @@
 
 :`main.anonymous-user`, `main.anonymous-password`:
     login and password to use to connect to the RQL server with
-    HTTP anonymous connection. EUser account should exist.
+    HTTP anonymous connection. CWUser account should exist.
 
 :`main.base-url`:
     url base site to be used to generate the urls of web pages
@@ -146,7 +146,7 @@
 
 Configuring Eproperties
 -----------------------
-Other configuration settings are in the form of entities `EProperty`
+Other configuration settings are in the form of entities `CWProperty`
 in the database. It must be edited via the web interface or by
 RQL queries.
 
--- a/doc/book/en/D070-cookbook.en.txt	Fri Apr 17 13:21:05 2009 +0200
+++ b/doc/book/en/D070-cookbook.en.txt	Fri Apr 17 16:55:37 2009 +0200
@@ -42,7 +42,7 @@
         update = "UPDATE entities SET source='system' WHERE eid=%(eid)s;"
         cursor.execute("SELECT eid,type,source,extid,mtime FROM entities WHERE source!='system'")
         for eid, type, source, extid, mtime in cursor.fetchall():
-            if type != 'EUser':
+            if type != 'CWUser':
                 print "don't know what to do with entity type", type
                 continue
             if source != 'ldapuser':
--- a/doc/book/en/MERGE_ME-tut-create-app.en.txt	Fri Apr 17 13:21:05 2009 +0200
+++ b/doc/book/en/MERGE_ME-tut-create-app.en.txt	Fri Apr 17 16:55:37 2009 +0200
@@ -323,7 +323,7 @@
   
   _ = unicode
 
-  moderators      = add_entity('EGroup', name=u"moderators")
+  moderators      = add_entity('CWGroup', name=u"moderators")
 
   submitted = add_state(_('submitted'), 'BlogEntry', initial=True)
   published = add_state(_('published'), 'BlogEntry')
--- a/doc/book/fr/02-foundation.fr.txt	Fri Apr 17 13:21:05 2009 +0200
+++ b/doc/book/fr/02-foundation.fr.txt	Fri Apr 17 16:55:37 2009 +0200
@@ -258,7 +258,7 @@
     réponse 
   * `cursor()` retourne un curseur RQL sur la session
   * `execute(*args, **kwargs)`, raccourci vers .cursor().execute()
-  * `property_value(key)`, gestion des propriétés (`EProperty`)
+  * `property_value(key)`, gestion des propriétés (`CWProperty`)
   * le dictionaire `data` pour stocker des données pour partager de
     l'information entre les composants *durant l'éxécution de la requête*.
 
--- a/doc/book/fr/04-01-schema-stdlib.fr.txt	Fri Apr 17 13:21:05 2009 +0200
+++ b/doc/book/fr/04-01-schema-stdlib.fr.txt	Fri Apr 17 16:55:37 2009 +0200
@@ -11,10 +11,10 @@
 Schémas "systèmes"
 ``````````````````
 
-* `EUser`, utilisateurs du système
-* `EGroup`, groupes d'utilisateurs
-* `EEType`, types d'entité
-* `ERType`, types de relation
+* `CWUser`, utilisateurs du système
+* `CWGroup`, groupes d'utilisateurs
+* `CWEType`, types d'entité
+* `CWRType`, types de relation
 
 * `State`, état d'un workflow
 * `Transition`, transition d'un workflow
@@ -23,8 +23,8 @@
 * `EmailAddress`, adresse électronique, utilisé par le système de notification
   pour les utilisateurs et par d'autres schéma optionnels
 
-* `EProperty`, utilisé pour configurer l'application
-* `EPermission`, utilisé pour configurer la sécurité de l'application
+* `CWProperty`, utilisé pour configurer l'application
+* `CWPermission`, utilisé pour configurer la sécurité de l'application
 
 * `Card`, fiche documentaire générique
 * `Bookmark`, un type d'entité utilisé pour permetter à un utilisateur de
--- a/doc/book/fr/04-02-schema-definition.fr.txt	Fri Apr 17 13:21:05 2009 +0200
+++ b/doc/book/fr/04-02-schema-definition.fr.txt	Fri Apr 17 16:55:37 2009 +0200
@@ -32,12 +32,12 @@
   
   - `modification_date` (`Datetime`)
   
-  - `created_by` (`EUser`) (quel utilisateur a créé l'entité)
+  - `created_by` (`CWUser`) (quel utilisateur a créé l'entité)
   
-  - `owned_by` (`EUser`) (à qui appartient l'entité, par défaut le
+  - `owned_by` (`CWUser`) (à qui appartient l'entité, par défaut le
      créateur mais pas forcément et il peut exister plusieurs propriétaires)
      
-  - `is` (`EEType`)
+  - `is` (`CWEType`)
 
   
 * il est également possible de définir des relations dont le type d'entité est
@@ -167,7 +167,7 @@
     inlined = True
     cardinality = '?*'
     subject = '*'
-    object = 'EUser'
+    object = 'CWUser'
 
 En plus des permissions, les propriétés propres aux types de relation (et donc
 partagés par toutes les définitions de relation de ce type) sont :
@@ -263,16 +263,16 @@
     'add'/'read' son pris en considération
 
 
-En plus de cela, le type d'entité `EPermission` de la librairie standard permet
+En plus de cela, le type d'entité `CWPermission` de la librairie standard permet
 de construire des modèles de sécurités très complexes et dynamiques. Le schéma
 de ce type d'entité est le suivant : ::
 
 
-    class EPermission(MetaEntityType):
+    class CWPermission(MetaEntityType):
 	"""entity type that may be used to construct some advanced security configuration
 	"""
 	name = String(required=True, indexed=True, internationalizable=True, maxsize=100)
-	require_group = SubjectRelation('EGroup', cardinality='+*',
+	require_group = SubjectRelation('CWGroup', cardinality='+*',
 					description=_('groups to which the permission is granted'))
 	require_state = SubjectRelation('State',
 				    description=_("entity'state in which the permission is applyable"))
@@ -311,7 +311,7 @@
 		       }
 	inlined = True
 
-Cette configuration suppose indique qu'une entité `EPermission` de nom
+Cette configuration suppose indique qu'une entité `CWPermission` de nom
 "add_version" peut-être associée à un projet et donner le droit de créer des
 versions sur ce projet à des groupes spécifiques. Il est important de noter les
 points suivants :
@@ -319,7 +319,7 @@
 * dans ce cas il faut protéger à la fois le type d'entité "Version" et la
   relation liant une version à un projet ("version_of")
 
-* du fait de la généricité du type d'entité `EPermission`, il faut effectuer
+* du fait de la généricité du type d'entité `CWPermission`, il faut effectuer
   l'unification avec les groupes et / ou les états le cas échéant dans
   l'expression ("U in_group G, P require_group G" dans l'exemple ci-dessus)
 
--- a/doc/book/fr/06-define-workflows.fr.txt	Fri Apr 17 13:21:05 2009 +0200
+++ b/doc/book/fr/06-define-workflows.fr.txt	Fri Apr 17 16:55:37 2009 +0200
@@ -117,7 +117,7 @@
   
   _ = unicode
 
-  moderators      = add_entity('EGroup', name=u"moderators")
+  moderators      = add_entity('CWGroup', name=u"moderators")
 
   submitted = add_state(_('submitted'), 'BlogEntry', initial=True)
   published = add_state(_('published'), 'BlogEntry')
--- a/doc/book/fr/09-instance-config.fr.txt	Fri Apr 17 13:21:05 2009 +0200
+++ b/doc/book/fr/09-instance-config.fr.txt	Fri Apr 17 16:55:37 2009 +0200
@@ -29,7 +29,7 @@
 
 :`main.anonymous-user`, `main.anonymous-password`:
    login et mot de passe à utiliser pour se connecter au serveur RQL lors des
-   connexions HTTP anonymes. Il faut que le compte EUser associé existe.
+   connexions HTTP anonymes. Il faut que le compte CWUser associé existe.
 
 :`main.base-url`:
    url de base du site, à utiliser pour générer les urls des pages web
@@ -145,7 +145,7 @@
 
 Configuration Eproperties
 -------------------------
-D'autres paramètres de configuration sont sous la forme d'entités `EProperty`
+D'autres paramètres de configuration sont sous la forme d'entités `CWProperty`
 dans la base de données. Il faut donc les éditer via l'interface web ou par des
 requêtes rql.
 
--- a/doc/book/fr/12-ui-components.fr.txt	Fri Apr 17 13:21:05 2009 +0200
+++ b/doc/book/fr/12-ui-components.fr.txt	Fri Apr 17 16:55:37 2009 +0200
@@ -9,6 +9,6 @@
 ---------------------
 XXXFILLME
 
-EProperty
+CWProperty
 ---------
 XXXFILLME
--- a/doc/book/fr/MERGE_ME-tut-create-app.fr.txt	Fri Apr 17 13:21:05 2009 +0200
+++ b/doc/book/fr/MERGE_ME-tut-create-app.fr.txt	Fri Apr 17 16:55:37 2009 +0200
@@ -331,7 +331,7 @@
   
   _ = unicode
 
-  moderators      = add_entity('EGroup', name=u"moderators")
+  moderators      = add_entity('CWGroup', name=u"moderators")
 
   submitted = add_state(_('submitted'), 'BlogEntry', initial=True)
   published = add_state(_('published'), 'BlogEntry')
--- a/entities/__init__.py	Fri Apr 17 13:21:05 2009 +0200
+++ b/entities/__init__.py	Fri Apr 17 16:55:37 2009 +0200
@@ -124,7 +124,7 @@
         
     @property
     def creator(self):
-        """return the EUser entity which has created this entity, or None if
+        """return the CWUser entity which has created this entity, or None if
         unknown or if the curent user doesn't has access to this euser
         """
         try:
--- a/entities/authobjs.py	Fri Apr 17 13:21:05 2009 +0200
+++ b/entities/authobjs.py	Fri Apr 17 16:55:37 2009 +0200
@@ -5,22 +5,23 @@
 :contact: http://www.logilab.fr/ -- mailto:contact@logilab.fr
 """
 __docformat__ = "restructuredtext en"
+
 from logilab.common.decorators import cached
 
 from cubicweb import Unauthorized
 from cubicweb.entities import AnyEntity, fetch_config
 
-class EGroup(AnyEntity):
-    id = 'EGroup'
+class CWGroup(AnyEntity):
+    id = 'CWGroup'
     fetch_attrs, fetch_order = fetch_config(['name'])
     fetch_unrelated_order = fetch_order
 
     def db_key_name(self):
         """XXX goa specific"""
         return self.get('name')
-    
-class EUser(AnyEntity):
-    id = 'EUser'
+
+class CWUser(AnyEntity):
+    id = 'CWUser'
     fetch_attrs, fetch_order = fetch_config(['login', 'firstname', 'surname'])
     fetch_unrelated_order = fetch_order
     
@@ -31,7 +32,7 @@
     def __init__(self, *args, **kwargs):
         groups = kwargs.pop('groups', None)
         properties = kwargs.pop('properties', None)
-        super(EUser, self).__init__(*args, **kwargs)
+        super(CWUser, self).__init__(*args, **kwargs)
         if groups is not None:
             self._groups = groups
         if properties is not None:
@@ -91,7 +92,7 @@
     def owns(self, eid):
         if hasattr(self.req, 'unsafe_execute'):
             # use unsafe_execute on the repository side, in case
-            # session's user doesn't have access to EUser
+            # session's user doesn't have access to CWUser
             execute = self.req.unsafe_execute
         else:
             execute = self.req.execute
@@ -103,7 +104,7 @@
     owns = cached(owns, keyarg=1)
 
     def has_permission(self, pname, contexteid=None):
-        rql = 'Any P WHERE P is EPermission, U eid %(u)s, U in_group G, '\
+        rql = 'Any P WHERE P is CWPermission, U eid %(u)s, U in_group G, '\
               'P name %(pname)s, P require_group G'
         kwargs = {'pname': pname, 'u': self.eid}
         cachekey = None
@@ -138,5 +139,5 @@
         return self.get('login')
 
 from logilab.common.deprecation import class_renamed
-Euser = class_renamed('Euser', EUser)
-Euser.id = 'Euser'
+EUser = class_renamed('EUser', CWUser)
+EGroup = class_renamed('EGroup', CWGroup)
--- a/entities/lib.py	Fri Apr 17 13:21:05 2009 +0200
+++ b/entities/lib.py	Fri Apr 17 16:55:37 2009 +0200
@@ -88,8 +88,8 @@
 Emailaddress.id = 'Emailaddress'
 
 
-class EProperty(AnyEntity):
-    id = 'EProperty'
+class CWProperty(AnyEntity):
+    id = 'CWProperty'
 
     fetch_attrs, fetch_order = fetch_config(['pkey', 'value'])    
     rest_attr = 'pkey'
@@ -144,9 +144,9 @@
         return self.synopsis or u''
 
 
-class ECache(AnyEntity):
+class CWCache(AnyEntity):
     """Cache"""
-    id = 'ECache'
+    id = 'CWCache'
     
     fetch_attrs, fetch_order = fetch_config(['name'])
 
--- a/entities/schemaobjs.py	Fri Apr 17 13:21:05 2009 +0200
+++ b/entities/schemaobjs.py	Fri Apr 17 16:55:37 2009 +0200
@@ -14,8 +14,8 @@
 from cubicweb.entities import AnyEntity, fetch_config
 
 
-class EEType(AnyEntity):
-    id = 'EEType'
+class CWEType(AnyEntity):
+    id = 'CWEType'
     fetch_attrs, fetch_order = fetch_config(['name'])
 
     def dc_title(self):
@@ -37,8 +37,8 @@
         return self.get('name')
 
 
-class ERType(AnyEntity):
-    id = 'ERType'
+class CWRType(AnyEntity):
+    id = 'CWRType'
     fetch_attrs, fetch_order = fetch_config(['name'])
     
     def dc_title(self):
@@ -85,8 +85,8 @@
         return self.get('name')
 
 
-class ENFRDef(AnyEntity):
-    id = 'ENFRDef'
+class CWRelation(AnyEntity):
+    id = 'CWRelation'
     fetch_attrs = fetch_config(['cardinality'])[0]
     
     def dc_title(self):
@@ -113,11 +113,11 @@
         """
         if self.relation_type:
             return self.relation_type[0].rest_path(), {}
-        return super(ENFRDef, self).after_deletion_path()
+        return super(CWRelation, self).after_deletion_path()
 
 
-class EFRDef(ENFRDef):
-    id = 'EFRDef'
+class CWAttribute(CWRelation):
+    id = 'CWAttribute'
     
     def dc_long_title(self):
         card = self.cardinality
@@ -130,8 +130,8 @@
             self.to_entity[0].name)
 
 
-class EConstraint(AnyEntity):
-    id = 'EConstraint'
+class CWConstraint(AnyEntity):
+    id = 'CWConstraint'
     fetch_attrs, fetch_order = fetch_config(['value'])
 
     def dc_title(self):
@@ -143,7 +143,7 @@
         """
         if self.reverse_constrained_by:
             return self.reverse_constrained_by[0].rest_path(), {}
-        return super(EConstraint, self).after_deletion_path()
+        return super(CWConstraint, self).after_deletion_path()
 
     @property
     def type(self):
@@ -184,8 +184,8 @@
         return super(RQLExpression, self).after_deletion_path()
 
 
-class EPermission(AnyEntity):
-    id = 'EPermission'
+class CWPermission(AnyEntity):
+    id = 'CWPermission'
     fetch_attrs, fetch_order = fetch_config(['name', 'label'])
 
     def dc_title(self):
@@ -200,4 +200,4 @@
         permissionof = getattr(self, 'reverse_require_permission', ())
         if len(permissionof) == 1:
             return permissionof[0].rest_path(), {}
-        return super(EPermission, self).after_deletion_path()
+        return super(CWPermission, self).after_deletion_path()
--- a/entities/test/unittest_base.py	Fri Apr 17 13:21:05 2009 +0200
+++ b/entities/test/unittest_base.py	Fri Apr 17 16:55:37 2009 +0200
@@ -10,7 +10,7 @@
 from cubicweb import ValidationError
 from cubicweb.interfaces import IMileStone, IWorkflowable
 from cubicweb.entities import AnyEntity
-from cubicweb.entities.authobjs import EUser
+from cubicweb.entities.authobjs import CWUser
 from cubicweb.web.widgets import AutoCompletionWidget
 
 
@@ -36,20 +36,20 @@
 
     def test_entity_meta_attributes(self):
         # XXX move to yams
-        self.assertEquals(self.schema['EUser'].meta_attributes(), {})
+        self.assertEquals(self.schema['CWUser'].meta_attributes(), {})
         self.assertEquals(dict((str(k), v) for k, v in self.schema['Card'].meta_attributes().iteritems()),
                           {'content_format': ('format', 'content')})
         
 
-class EUserTC(BaseEntityTC):
+class CWUserTC(BaseEntityTC):
     def test_dc_title_and_name(self):
-        e = self.entity('EUser U WHERE U login "member"')
+        e = self.entity('CWUser U WHERE U login "member"')
         self.assertEquals(e.dc_title(), 'member')
         self.assertEquals(e.name(), 'member')
-        self.execute(u'SET X firstname "bouah" WHERE X is EUser, X login "member"')
+        self.execute(u'SET X firstname "bouah" WHERE X is CWUser, X login "member"')
         self.assertEquals(e.dc_title(), 'member')
         self.assertEquals(e.name(), u'bouah')
-        self.execute(u'SET X surname "lôt" WHERE X is EUser, X login "member"')
+        self.execute(u'SET X surname "lôt" WHERE X is CWUser, X login "member"')
         self.assertEquals(e.dc_title(), 'member')
         self.assertEquals(e.name(), u'bouah lôt')
 
@@ -57,7 +57,7 @@
 class StateAndTransitionsTC(BaseEntityTC):
         
     def test_transitions(self):
-        user = self.entity('EUser X')
+        user = self.entity('CWUser X')
         e = self.entity('State S WHERE S name "activated"')
         trs = list(e.transitions(user))
         self.assertEquals(len(trs), 1)
@@ -71,12 +71,12 @@
         e = self.entity('State S WHERE S name "activated"')
         trs = list(e.transitions(user))
         self.assertEquals(len(trs), 0)
-        user = self.entity('EUser X')
+        user = self.entity('CWUser X')
         self.assert_(not user.can_pass_transition('deactivate'))
         self.assert_(not user.can_pass_transition('activate'))
         
     def test_transitions_with_dest_specfied(self):
-        user = self.entity('EUser X')
+        user = self.entity('CWUser X')
         e = self.entity('State S WHERE S name "activated"')
         e2 = self.entity('State S WHERE S name "deactivated"')
         trs = list(e.transitions(user, e2.eid))
@@ -132,9 +132,9 @@
         state3 = self.add_entity('State', name=u'state3')
         tr1 = self.add_entity('Transition', name=u'tr1')
         tr2 = self.add_entity('Transition', name=u'tr2')
-        self.execute('SET X state_of Y WHERE X eid in (%s, %s), Y is EEType, Y name "Card"' %
+        self.execute('SET X state_of Y WHERE X eid in (%s, %s), Y is CWEType, Y name "Card"' %
                       (state1.eid, state2.eid))
-        self.execute('SET X state_of Y WHERE X eid in (%s, %s), Y is EEType, Y name "Bookmark"' %
+        self.execute('SET X state_of Y WHERE X eid in (%s, %s), Y is CWEType, Y name "Bookmark"' %
                       (state1.eid, state3.eid))
         self.execute('SET X transition_of Y WHERE X eid %s, Y name "Card"' % tr1.eid)
         self.execute('SET X transition_of Y WHERE X eid %s, Y name "Bookmark"' % tr2.eid)
@@ -171,9 +171,9 @@
         state2 = self.add_entity('State', name=u'state2')
         tr1 = self.add_entity('Transition', name=u'tr1')
         tr2 = self.add_entity('Transition', name=u'tr2')
-        self.execute('SET X state_of Y WHERE X eid in (%s, %s), Y is EEType, Y name "Card"' %
+        self.execute('SET X state_of Y WHERE X eid in (%s, %s), Y is CWEType, Y name "Card"' %
                       (state1.eid, state2.eid))
-        self.execute('SET X state_of Y WHERE X eid in (%s, %s), Y is EEType, Y name "Bookmark"' %
+        self.execute('SET X state_of Y WHERE X eid in (%s, %s), Y is CWEType, Y name "Bookmark"' %
                       (state1.eid, state2.eid))
         self.execute('SET X transition_of Y WHERE X eid %s, Y name "Card"' % tr1.eid)
         self.execute('SET X transition_of Y WHERE X eid %s, Y name "Bookmark"' % tr2.eid)
@@ -225,15 +225,15 @@
         self.assertEquals(email.printable_value('address'), 'syt')
 
 
-class EUserTC(BaseEntityTC):
+class CWUserTC(BaseEntityTC):
     
     def test_complete(self):
-        e = self.entity('EUser X WHERE X login "admin"')
+        e = self.entity('CWUser X WHERE X login "admin"')
         e.complete()
 
         
     def test_matching_groups(self):
-        e = self.entity('EUser X WHERE X login "admin"')
+        e = self.entity('CWUser X WHERE X login "admin"')
         self.failUnless(e.matching_groups('managers'))
         self.failIf(e.matching_groups('xyz'))
         self.failUnless(e.matching_groups(('xyz', 'managers')))
@@ -251,7 +251,7 @@
         e.change_state(deactivatedeid, u'deactivate 2')
         self.commit()
         # get a fresh user to avoid potential cache issues
-        e = self.entity('EUser X WHERE X eid %s' % e.eid)
+        e = self.entity('CWUser X WHERE X eid %s' % e.eid)
         self.assertEquals([tr.comment for tr in e.reverse_wf_info_for],
                           [None, 'deactivate 1', 'activate 1', 'deactivate 2'])
         self.assertEquals(e.latest_trinfo().comment, 'deactivate 2')
@@ -260,11 +260,11 @@
 class InterfaceTC(EnvBasedTC):
 
     def test_nonregr_subclasses_and_mixins_interfaces(self):
-        class MyUser(EUser):
+        class MyUser(CWUser):
             __implements__ = (IMileStone,)
         self.vreg._loadedmods[__name__] = {}
         self.vreg.register_vobject_class(MyUser)
-        self.failUnless(implements(EUser, IWorkflowable))
+        self.failUnless(implements(CWUser, IWorkflowable))
         self.failUnless(implements(MyUser, IMileStone))
         self.failUnless(implements(MyUser, IWorkflowable))
 
--- a/goa/appobjects/dbmgmt.py	Fri Apr 17 13:21:05 2009 +0200
+++ b/goa/appobjects/dbmgmt.py	Fri Apr 17 16:55:37 2009 +0200
@@ -168,7 +168,7 @@
 class ContentClear(StartupView):
     id = 'contentclear'
     __select__ = none_rset() & match_user_groups('managers')
-    skip_etypes = ('EGroup', 'EUser')
+    skip_etypes = ('CWGroup', 'CWUser')
     
     def call(self):
         # XXX should use unsafe_execute with all hooks deactivated
--- a/goa/appobjects/gauthservice.py	Fri Apr 17 13:21:05 2009 +0200
+++ b/goa/appobjects/gauthservice.py	Fri Apr 17 16:55:37 2009 +0200
@@ -12,7 +12,7 @@
 from google.appengine.api import users
 
 
-class GAEUserLink(UserLink):
+class GACWUserLink(UserLink):
 
     def anon_user_link(self):
         self.w(self.req._('anonymous'))
@@ -26,5 +26,5 @@
     
 def registration_callback(vreg):
     if hasattr(vreg.config, 'has_resource'):
-        vreg.register(GAEUserLink, clear=True)
+        vreg.register(GACWUserLink, clear=True)
         vreg.register(GAELogoutAction, clear=True)
--- a/goa/dbinit.py	Fri Apr 17 13:21:05 2009 +0200
+++ b/goa/dbinit.py	Fri Apr 17 16:55:37 2009 +0200
@@ -15,7 +15,7 @@
     try:
         return _GROUP_CACHE[groupname]
     except KeyError:
-        key = Key.from_path('EGroup', 'key_' + groupname, parent=None)
+        key = Key.from_path('CWGroup', 'key_' + groupname, parent=None)
         try:
             group = Get(key)
         except datastore_errors.EntityNotFoundError:
@@ -29,7 +29,7 @@
 def create_user(login, password, groups):
     """create a cubicweb user"""
     from cubicweb.server.utils import crypt_password
-    user = Entity('EUser', name=login)
+    user = Entity('CWUser', name=login)
     user['s_login'] = unicode(login)
     user['s_upassword'] = crypt_password(password)
     set_user_groups(user, groups)
@@ -39,7 +39,7 @@
 def create_groups():
     """create initial cubicweb groups"""
     for groupname in ('managers', 'users', 'guests'):
-        group = Entity('EGroup', name='key_' + groupname)
+        group = Entity('CWGroup', name='key_' + groupname)
         group['s_name'] = unicode(groupname)
         Put(group)
         _GROUP_CACHE[groupname] = group
@@ -74,23 +74,23 @@
             gaeentity[dsrelation] = None
     
 def fix_entities(schema):
-    for etype in ('EUser', 'EGroup'):
+    for etype in ('CWUser', 'CWGroup'):
         eschema = schema.eschema(etype)
         for gaeentity in Query(etype).Run():
             init_relations(gaeentity, eschema)
-            # XXX o_is on EEType entity
-            gaeentity['s_is'] = Key.from_path('EEType', 'key_' + etype, parent=None)
+            # XXX o_is on CWEType entity
+            gaeentity['s_is'] = Key.from_path('CWEType', 'key_' + etype, parent=None)
             Put(gaeentity)
     
 def init_persistent_schema(ssession, schema):
     execute = ssession.unsafe_execute
-    rql = ('INSERT EEType X: X name %(name)s, X description %(descr)s,'
+    rql = ('INSERT CWEType X: X name %(name)s, X description %(descr)s,'
            'X final FALSE, X meta %(meta)s')
-    eschema = schema.eschema('EEType')
-    execute(rql, {'name': u'EEType', 'descr': unicode(eschema.description),
+    eschema = schema.eschema('CWEType')
+    execute(rql, {'name': u'CWEType', 'descr': unicode(eschema.description),
                   'meta': eschema.meta})
     for eschema in schema.entities():
-        if eschema.is_final() or eschema == 'EEType':
+        if eschema.is_final() or eschema == 'CWEType':
             continue
         execute(rql, {'name': unicode(eschema), 'meta': eschema.meta,
                       'descr': unicode(eschema.description)})
@@ -98,11 +98,11 @@
 def insert_versions(ssession, config):
     execute = ssession.unsafe_execute
     # insert versions
-    execute('INSERT EProperty X: X pkey %(pk)s, X value%(v)s',
+    execute('INSERT CWProperty X: X pkey %(pk)s, X value%(v)s',
             {'pk': u'system.version.cubicweb',
              'v': unicode(config.cubicweb_version())})
     for cube in config.cubes():
-        execute('INSERT EProperty X: X pkey %(pk)s, X value%(v)s',
+        execute('INSERT CWProperty X: X pkey %(pk)s, X value%(v)s',
                 {'pk': u'system.version.%s' % cube,
                  'v': unicode(config.cube_version(cube))})
     
--- a/goa/dbmyams.py	Fri Apr 17 13:21:05 2009 +0200
+++ b/goa/dbmyams.py	Fri Apr 17 16:55:37 2009 +0200
@@ -179,7 +179,7 @@
         for obj in vars(appschema).values():
             if isinstance(obj, type) and issubclass(obj, goadb.Model) and obj.__module__ == appschema.__name__:
                 loader.load_dbmodel(obj.__name__, goadb.extract_dbmodel(obj))
-    for erschema in ('EGroup', 'EEType', 'ERType', 'RQLExpression',
+    for erschema in ('CWGroup', 'CWEType', 'CWRType', 'RQLExpression',
                      'is_', 'is_instance_of',
                      'read_permission', 'add_permission',
                      'delete_permission', 'update_permission'):
@@ -194,18 +194,18 @@
     if extrahook is not None:
         extrahook(loader)
     if config['use-google-auth']:
-        loader.defined['EUser'].remove_relation('upassword')
-        loader.defined['EUser'].permissions['add'] = ()
-        loader.defined['EUser'].permissions['delete'] = ()
-    for etype in ('EGroup', 'RQLExpression'):
+        loader.defined['CWUser'].remove_relation('upassword')
+        loader.defined['CWUser'].permissions['add'] = ()
+        loader.defined['CWUser'].permissions['delete'] = ()
+    for etype in ('CWGroup', 'RQLExpression'):
         read_perm_rel = loader.defined[etype].get_relations('read_permission').next()
         read_perm_rel.cardinality = '**'
-    # XXX not yet ready for EUser workflow
-    loader.defined['EUser'].remove_relation('in_state')
-    loader.defined['EUser'].remove_relation('wf_info_for')
-    # remove RQLConstraint('NOT O name "owners"') on EUser in_group EGroup
+    # XXX not yet ready for CWUser workflow
+    loader.defined['CWUser'].remove_relation('in_state')
+    loader.defined['CWUser'].remove_relation('wf_info_for')
+    # remove RQLConstraint('NOT O name "owners"') on CWUser in_group CWGroup
     # since "owners" group is not persistent with gae
-    loader.defined['EUser'].get_relations('in_group').next().constraints = []
+    loader.defined['CWUser'].get_relations('in_group').next().constraints = []
     # return the full schema including the cubes' schema
     for ertype in loader.defined.values():
         if getattr(ertype, 'inlined', False):
--- a/goa/doc/devmanual_fr/chap_autres_composants_ui.txt	Fri Apr 17 13:21:05 2009 +0200
+++ b/goa/doc/devmanual_fr/chap_autres_composants_ui.txt	Fri Apr 17 16:55:37 2009 +0200
@@ -9,6 +9,6 @@
 ---------------------
 XXXFILLME
 
-EProperty
+CWProperty
 ---------
 XXXFILLME
--- a/goa/doc/devmanual_fr/chap_bases_framework_erudi.txt	Fri Apr 17 13:21:05 2009 +0200
+++ b/goa/doc/devmanual_fr/chap_bases_framework_erudi.txt	Fri Apr 17 16:55:37 2009 +0200
@@ -127,7 +127,7 @@
     réponse 
   * `cursor()` retourne un curseur RQL sur la session
   * `execute(*args, **kwargs)`, raccourci vers .cursor().execute()
-  * `property_value(key)`, gestion des propriétés (`EProperty`)
+  * `property_value(key)`, gestion des propriétés (`CWProperty`)
   * le dictionaire `data` pour stocker des données pour partager de
     l'information entre les composants *durant l'éxécution de la requête*.
 
--- a/goa/doc/devmanual_fr/chap_configuration_instance.txt	Fri Apr 17 13:21:05 2009 +0200
+++ b/goa/doc/devmanual_fr/chap_configuration_instance.txt	Fri Apr 17 16:55:37 2009 +0200
@@ -27,7 +27,7 @@
 
 :`main.anonymous-user`, `main.anonymous-password`:
    login et mot de passe à utiliser pour se connecter au serveur RQL lors des
-   connexions HTTP anonymes. Il faut que le compte EUser associé existe.
+   connexions HTTP anonymes. Il faut que le compte CWUser associé existe.
 
 :`main.base-url`:
    url de base du site, à utiliser pour générer les urls des pages web
@@ -143,7 +143,7 @@
 
 Configuration Eproperties
 -------------------------
-D'autres paramètres de configuration sont sous la forme d'entités `EProperty`
+D'autres paramètres de configuration sont sous la forme d'entités `CWProperty`
 dans la base de données. Il faut donc les éditer via l'interface web ou par des
 requêtes rql.
 
--- a/goa/doc/devmanual_fr/sect_definition_schema.txt	Fri Apr 17 13:21:05 2009 +0200
+++ b/goa/doc/devmanual_fr/sect_definition_schema.txt	Fri Apr 17 16:55:37 2009 +0200
@@ -27,8 +27,8 @@
   - `eid` (`Int`)
   - `creation_date` (`Datetime`)
   - `modification_date` (`Datetime`)
-  - `owned_by` (`EUser`)
-  - `is` (`EEType`)
+  - `owned_by` (`CWUser`)
+  - `is` (`CWEType`)
 
 * il est également possible de définir des relations dont le type d'entité est
   l'objet en utilisant `ObjectRelation` plutôt que `SubjectRelation`
@@ -158,7 +158,7 @@
     inlined = True
     cardinality = '?*'
     subject = '*'
-    object = 'EUser'
+    object = 'CWUser'
 
 En plus des permissions, les propriétés propres aux types de relation (et donc
 partagés par toutes les définitions de relation de ce type) sont :
@@ -254,16 +254,16 @@
     'add'/'read' son pris en considération
 
 
-En plus de cela, le type d'entité `EPermission` de la librairie standard permet
+En plus de cela, le type d'entité `CWPermission` de la librairie standard permet
 de construire des modèles de sécurités très complexes et dynamiques. Le schéma
 de ce type d'entité est le suivant : ::
 
 
-    class EPermission(MetaEntityType):
+    class CWPermission(MetaEntityType):
 	"""entity type that may be used to construct some advanced security configuration
 	"""
 	name = String(required=True, indexed=True, internationalizable=True, maxsize=100)
-	require_group = SubjectRelation('EGroup', cardinality='+*',
+	require_group = SubjectRelation('CWGroup', cardinality='+*',
 					description=_('groups to which the permission is granted'))
 	require_state = SubjectRelation('State',
 				    description=_("entity'state in which the permission is applyable"))
@@ -302,7 +302,7 @@
 		       }
 	inlined = True
 
-Cette configuration suppose indique qu'une entité `EPermission` de nom
+Cette configuration suppose indique qu'une entité `CWPermission` de nom
 "add_version" peut-être associée à un projet et donner le droit de créer des
 versions sur ce projet à des groupes spécifiques. Il est important de noter les
 points suivants :
@@ -310,7 +310,7 @@
 * dans ce cas il faut protéger à la fois le type d'entité "Version" et la
   relation liant une version à un projet ("version_of")
 
-* du fait de la généricité du type d'entité `EPermission`, il faut effectuer
+* du fait de la généricité du type d'entité `CWPermission`, il faut effectuer
   l'unification avec les groupes et / ou les états le cas échéant dans
   l'expression ("U in_group G, P require_group G" dans l'exemple ci-dessus)
 
--- a/goa/doc/devmanual_fr/sect_stdlib_schemas.txt	Fri Apr 17 13:21:05 2009 +0200
+++ b/goa/doc/devmanual_fr/sect_stdlib_schemas.txt	Fri Apr 17 16:55:37 2009 +0200
@@ -9,10 +9,10 @@
 Schémas "systèmes"
 ``````````````````
 
-* `EUser`, utilisateurs du système
-* `EGroup`, groupes d'utilisateurs
-* `EEType`, types d'entité
-* `ERType`, types de relation
+* `CWUser`, utilisateurs du système
+* `CWGroup`, groupes d'utilisateurs
+* `CWEType`, types d'entité
+* `CWRType`, types de relation
 
 * `State`, état d'un workflow
 * `Transition`, transition d'un workflow
@@ -21,8 +21,8 @@
 * `EmailAddress`, adresse électronique, utilisé par le système de notification
   pour les utilisateurs et par d'autres schéma optionnels
 
-* `EProperty`, utilisé pour configurer l'application
-* `EPermission`, utilisé pour configurer la sécurité de l'application
+* `CWProperty`, utilisé pour configurer l'application
+* `CWPermission`, utilisé pour configurer la sécurité de l'application
 
 * `Card`, fiche documentaire générique
 * `Bookmark`, un type d'entité utilisé pour permetter à un utilisateur de
--- a/goa/gaesource.py	Fri Apr 17 13:21:05 2009 +0200
+++ b/goa/gaesource.py	Fri Apr 17 16:55:37 2009 +0200
@@ -36,11 +36,11 @@
             pass
         else:
             entity.clear_related_cache(rtype, role)
-    if gaesubject.kind() == 'EUser':
+    if gaesubject.kind() == 'CWUser':
         for asession in session.repo._sessions.itervalues():
             if asession.user.eid == subject:
                 asession.user.clear_related_cache(rtype, 'subject')
-    if gaeobject.kind() == 'EUser':
+    if gaeobject.kind() == 'CWUser':
         for asession in session.repo._sessions.itervalues():
             if asession.user.eid == object:
                 asession.user.clear_related_cache(rtype, 'object')
@@ -114,9 +114,9 @@
 class GAESource(AbstractSource):
     """adapter for a system source on top of google appengine datastore"""
 
-    passwd_rql = "Any P WHERE X is EUser, X login %(login)s, X upassword P"
-    auth_rql = "Any X WHERE X is EUser, X login %(login)s, X upassword %(pwd)s"
-    _sols = ({'X': 'EUser', 'P': 'Password'},)
+    passwd_rql = "Any P WHERE X is CWUser, X login %(login)s, X upassword P"
+    auth_rql = "Any X WHERE X is CWUser, X login %(login)s, X upassword %(pwd)s"
+    _sols = ({'X': 'CWUser', 'P': 'Password'},)
     
     options = ()
     
@@ -157,7 +157,7 @@
         """set the application'schema"""
         self.interpreter = RQLInterpreter(schema)
         self.schema = schema
-        if 'EUser' in schema and not self.repo.config['use-google-auth']:
+        if 'CWUser' in schema and not self.repo.config['use-google-auth']:
             # rql syntax trees used to authenticate users
             self._passwd_rqlst = self.compile_rql(self.passwd_rql)
             self._auth_rqlst = self.compile_rql(self.auth_rql)
@@ -185,7 +185,7 @@
         # XXX http://code.google.com/appengine/docs/users/userobjects.html
         # use a reference property to automatically work with email address
         # changes after the propagation feature is implemented
-        key = Key.from_path('EUser', 'key_' + login, parent=None)
+        key = Key.from_path('CWUser', 'key_' + login, parent=None)
         try:
             euser = session.datastore_get(key)
             # XXX fix user. Required until we find a better way to fix broken records
@@ -195,14 +195,14 @@
             return str(key)
         except datastore_errors.EntityNotFoundError:
             # create a record for this user
-            euser = Entity('EUser', name='key_' + login)
+            euser = Entity('CWUser', name='key_' + login)
             euser['s_login'] = login
             _init_groups(guser, euser)
             Put(euser)
             return str(euser.key())
         
     def authenticate_local(self, session, login, password):
-        """return EUser eid for the given login/password if this account is
+        """return CWUser eid for the given login/password if this account is
         defined in this source, else raise `AuthenticationError`
 
         two queries are needed since passwords are stored crypted, so we have
@@ -249,7 +249,7 @@
         """replace an entity in the source"""
         gaeentity = entity.to_gae_model()
         _mark_modified(session, entity.to_gae_model())
-        if gaeentity.kind() == 'EUser':
+        if gaeentity.kind() == 'CWUser':
             for asession in self.repo._sessions.itervalues():
                 if asession.user.eid == entity.eid:
                     asession.user.update(dict(gaeentity))
--- a/goa/test/unittest_db.py	Fri Apr 17 13:21:05 2009 +0200
+++ b/goa/test/unittest_db.py	Fri Apr 17 16:55:37 2009 +0200
@@ -18,20 +18,20 @@
     MODEL_CLASSES = (Blog,)
 
     def test_set_none_relation(self):
-        eprop = self.add_entity('EProperty', pkey=u'ui.language', value=u'en')
+        eprop = self.add_entity('CWProperty', pkey=u'ui.language', value=u'en')
         self.failUnless('s_for_user' in eprop._dbmodel)
         self.assertEquals(eprop._dbmodel['s_for_user'], None)
 
     def test_euser_key(self):
-        euser = self.add_entity('EUser', login=u'toto', upassword='toto')
+        euser = self.add_entity('CWUser', login=u'toto', upassword='toto')
         self.assertEquals(euser.key().name(), 'key_toto')
         
     def test_egroup_key(self):
-        egroup = self.add_entity('EGroup', name=u'toto')
+        egroup = self.add_entity('CWGroup', name=u'toto')
         self.assertEquals(egroup.key().name(), 'key_toto')
 
     def test_password_encryption(self):
-        euser = self.add_entity('EUser', login=u'toto', upassword='toto')
+        euser = self.add_entity('CWUser', login=u'toto', upassword='toto')
         self.failUnless(euser.upassword != 'toto', euser.upassword)
         self.assertEquals(crypt_password('toto', euser.upassword[:2]), euser.upassword)
 
--- a/goa/test/unittest_editcontroller.py	Fri Apr 17 13:21:05 2009 +0200
+++ b/goa/test/unittest_editcontroller.py	Fri Apr 17 16:55:37 2009 +0200
@@ -8,7 +8,7 @@
 from cubicweb.web import INTERNAL_FIELD_VALUE, Redirect
 
 from cubicweb.goa.goaconfig import GAEConfiguration
-from cubicweb.entities.authobjs import EUser
+from cubicweb.entities.authobjs import CWUser
 
 
 class EditControllerTC(GAEBasedTC):
@@ -73,7 +73,7 @@
     def test_validation_unique(self):
         """test creation of two linked entities"""        
         user = self.user
-        self.req.form = {'eid': 'X', '__type:X': 'EUser',
+        self.req.form = {'eid': 'X', '__type:X': 'CWUser',
                          'login:X': self.user.login, 'edits-login:X': u'', 
                          'upassword:X': u'toto', 'upassword-confirm:X': u'toto', 'edits-upassword:X': u'', 
                          }
@@ -84,13 +84,13 @@
         """checking that a manager user can edit itself"""
         self.skip('missing actual gae support, retry latter')
         user = self.user
-        basegroups = [str(eid) for eid, in self.req.execute('EGroup G WHERE X in_group G, X eid %(x)s', {'x': user.eid})]
-        groupeids = [eid for eid, in self.req.execute('EGroup G WHERE G name in ("managers", "users")')]
+        basegroups = [str(eid) for eid, in self.req.execute('CWGroup G WHERE X in_group G, X eid %(x)s', {'x': user.eid})]
+        groupeids = [eid for eid, in self.req.execute('CWGroup G WHERE G name in ("managers", "users")')]
         groups = [str(eid) for eid in groupeids]
         stateeid = [eid for eid, in self.req.execute('State S WHERE S name "activated"')][0]
         self.req.form = {
             'eid':       user.eid,
-            '__type:'+user.eid:    'EUser',
+            '__type:'+user.eid:    'CWUser',
             'login:'+user.eid:     unicode(user.login),
             'firstname:'+user.eid: u'Th\xe9nault',
             'surname:'+user.eid:   u'Sylvain',
@@ -115,10 +115,10 @@
         user = self.create_user('user')
         cnx = self.login('user')
         req = self.request()
-        #self.assertEquals(self.ctrl.schema['EUser']._groups['read'],
+        #self.assertEquals(self.ctrl.schema['CWUser']._groups['read'],
         #                  ('managers', 'users'))
         req.form = {
-            'eid': user.eid, '__type:'+user.eid: 'EUser',
+            'eid': user.eid, '__type:'+user.eid: 'CWUser',
             '__maineid' : str(user.eid),
             'upassword:'+user.eid: 'tournicoton',
             'upassword-confirm:'+user.eid: 'tournicoton',
@@ -134,10 +134,10 @@
         relations (meaning no changes)
         """
         user = self.user
-        groupeids = [eid for eid, in self.req.execute('EGroup G WHERE X in_group G, X eid %(x)s', {'x': user.eid})]
+        groupeids = [eid for eid, in self.req.execute('CWGroup G WHERE X in_group G, X eid %(x)s', {'x': user.eid})]
         self.req.form = {
             'eid':       user.eid,
-            '__type:'+user.eid:    'EUser',
+            '__type:'+user.eid:    'CWUser',
             'login:'+user.eid:     unicode(user.login),
             'firstname:'+user.eid: u'Th\xe9nault',
             'surname:'+user.eid:   u'Sylvain',
@@ -158,10 +158,10 @@
         
         
     def test_create_multiple_linked(self):
-        gueid = self.req.execute('EGroup G WHERE G name "users"')[0][0]
+        gueid = self.req.execute('CWGroup G WHERE G name "users"')[0][0]
         self.req.form = {'eid': ['X', 'Y'],
                          
-                         '__type:X': 'EUser',
+                         '__type:X': 'CWUser',
                          '__maineid' : 'X',
                          'login:X': u'adim', 'edits-login:X': u'', 
                          'upassword:X': u'toto', 'upassword-confirm:X': u'toto', 'edits-upassword:X': u'', 
@@ -184,7 +184,7 @@
     def test_edit_multiple_linked(self):
         peid = self.create_user('adim').eid
         self.req.form = {'eid': [peid, 'Y'],
-                         '__type:%s'%peid: 'EUser',
+                         '__type:%s'%peid: 'CWUser',
                          'surname:%s'%peid: u'Di Masci', 'edits-surname:%s'%peid: '',
                          
                          '__type:Y': 'EmailAddress',
@@ -203,7 +203,7 @@
         
         emaileid = email.eid
         self.req.form = {'eid': [peid, emaileid],
-                         '__type:%s'%peid: 'EUser',
+                         '__type:%s'%peid: 'CWUser',
                          'surname:%s'%peid: u'Di Masci', 'edits-surname:%s'%peid: 'Di Masci',
                          '__type:%s'%emaileid: 'EmailAddress',
                          'address:%s'%emaileid: u'adim@logilab.fr', 'edits-address:%s'%emaileid: 'dima@logilab.fr',
@@ -226,13 +226,13 @@
         """        
         user = self.user
         self.req.form = {'__cloned_eid:X': user.eid,
-                         'eid': 'X', '__type:X': 'EUser',
+                         'eid': 'X', '__type:X': 'CWUser',
                          'login:X': u'toto', 'edits-login:X': u'', 
                          'upassword:X': u'toto', 'edits-upassword:X': u'', 
                          }
         self.assertRaises(ValidationError, self.publish, self.req)
         self.req.form = {'__cloned_eid:X': user.eid,
-                         'eid': 'X', '__type:X': 'EUser',
+                         'eid': 'X', '__type:X': 'CWUser',
                          'login:X': u'toto', 'edits-login:X': u'', 
                          'upassword:X': u'toto', 'upassword-confirm:X': u'tutu', 'edits-upassword:X': u'', 
                          }
@@ -241,7 +241,7 @@
 
     def test_req_pending_insert(self):
         """make sure req's pending insertions are taken into account"""
-        tmpgroup = self.add_entity('EGroup', name=u"test")
+        tmpgroup = self.add_entity('CWGroup', name=u"test")
         user = self.user
         self.req.set_session_data('pending_insert', set([(user.eid, 'in_group', tmpgroup.eid)]))
         path, params = self.expect_redirect_publish()
@@ -254,7 +254,7 @@
     def test_req_pending_delete(self):
         """make sure req's pending deletions are taken into account"""
         user = self.user
-        groupeid = self.req.execute('INSERT EGroup G: G name "test", U in_group G WHERE U eid %(x)s',
+        groupeid = self.req.execute('INSERT CWGroup G: G name "test", U in_group G WHERE U eid %(x)s',
                                     {'x': user.eid})[0][0]
         usergroups = [gname for gname, in
                       self.req.execute('Any N WHERE G name N, U in_group G, U eid %(u)s', {'u': user.eid})]
@@ -273,13 +273,13 @@
         def custom_login_edit(self, formparams, value, relations):
             formparams['login'] = value.upper()
             relations.append('X login %(login)s')
-        EUser.custom_login_edit = custom_login_edit
+        CWUser.custom_login_edit = custom_login_edit
         try:
             user = self.user
             eid = repr(user.eid)
             self.req.form = {
                 'eid': eid,
-                '__type:'+eid:  'EUser',
+                '__type:'+eid:  'CWUser',
                 'login:'+eid: u'foo',
                 'edits-login:'+eid:  unicode(user.login),
                 }
@@ -287,7 +287,7 @@
             rset = self.req.execute('Any L WHERE X eid %(x)s, X login L', {'x': user.eid}, 'x')
             self.assertEquals(rset[0][0], 'FOO')
         finally:
-            del EUser.custom_login_edit
+            del CWUser.custom_login_edit
         
     def test_redirect_apply_button(self):
         redirectrql = rql_for_eid(4012) # whatever
@@ -358,10 +358,10 @@
         
 
     def test_nonregr_multiple_empty_email_addr(self):
-        gueid = self.req.execute('EGroup G WHERE G name "users"')[0][0]
+        gueid = self.req.execute('CWGroup G WHERE G name "users"')[0][0]
         self.req.form = {'eid': ['X', 'Y'],
                          
-                         '__type:X': 'EUser',
+                         '__type:X': 'CWUser',
                          'login:X': u'adim', 'edits-login:X': u'', 
                          'upassword:X': u'toto', 'upassword-confirm:X': u'toto', 'edits-upassword:X': u'', 
                          'in_group:X': gueid, 'edits-in_group:X': INTERNAL_FIELD_VALUE, 
@@ -385,7 +385,7 @@
             self.req.execute('SET P use_email E, P primary_email E WHERE P eid %(p)s, E eid %(e)s',
                          {'p' : p.eid, 'e' : e.eid})
             self.req.form = {'__cloned_eid:X': p.eid,
-                             'eid': 'X', '__type:X': 'EUser',
+                             'eid': 'X', '__type:X': 'CWUser',
                              'login': u'dodo', 'edits-login': u'dodo', 
                              'surname:X': u'Boom', 'edits-surname:X': u'',
                              '__errorurl' : "whatever but required",
@@ -400,7 +400,7 @@
                 self.req.form['rql'] = 'Any X WHERE X eid %s' % p.eid
                 self.req.form['vid'] = 'copy'
                 self.env.app.publish('view', self.req)
-            rset = self.req.execute('EUser P WHERE P surname "Boom"')
+            rset = self.req.execute('CWUser P WHERE P surname "Boom"')
             self.assertEquals(len(rset), 0)
         finally:
             p.__class__.skip_copy_for = old_skips
--- a/goa/test/unittest_metadata.py	Fri Apr 17 13:21:05 2009 +0200
+++ b/goa/test/unittest_metadata.py	Fri Apr 17 16:55:37 2009 +0200
@@ -26,7 +26,7 @@
         GAEBasedTC.setUp(self)
         self.req = self.request()
         self.a = self.add_entity('Article')
-        self.p = self.add_entity('EProperty', pkey=u'ui.language', value=u'en')
+        self.p = self.add_entity('CWProperty', pkey=u'ui.language', value=u'en')
         self.session.commit()
         
     def _test_timestamp(self, entity, attr, sleep=0.1):
@@ -96,9 +96,9 @@
         en = self.execute('Any EN WHERE E name EN, X is E, X eid %(x)s', {'x': self.a.eid}, 'x')[0][0]
         self.assertEquals(en, 'Article')
         en = self.execute('Any EN WHERE E name EN, X is E, X eid %(x)s', {'x': self.p.eid}, 'x')[0][0]
-        self.assertEquals(en, 'EProperty') 
+        self.assertEquals(en, 'CWProperty') 
         en = self.execute('Any EN WHERE E name EN, X is E, X eid %(x)s', {'x': self.req.user.eid}, 'x')[0][0]
-        self.assertEquals(en, 'EUser')
+        self.assertEquals(en, 'CWUser')
 
         
 if __name__ == '__main__':
--- a/goa/test/unittest_rql.py	Fri Apr 17 13:21:05 2009 +0200
+++ b/goa/test/unittest_rql.py	Fri Apr 17 16:55:37 2009 +0200
@@ -566,13 +566,13 @@
         self.assertEquals(rset.rows, [[article2.eid]])
         
     def test_8_not_relation_final_1(self):
-        rset = self.req.execute('Any G WHERE G is EGroup, NOT G name "guests"')
+        rset = self.req.execute('Any G WHERE G is CWGroup, NOT G name "guests"')
         self._check_rset_size(rset, 2, 1)
         self.assertUnorderedIterableEquals([g.name for g in rset.entities()],
                                            ['users', 'managers'])        
         
     def test_8_not_relation_final_2(self):
-        rset = self.req.execute('Any GN WHERE G is EGroup, NOT G name "guests", G name GN')
+        rset = self.req.execute('Any GN WHERE G is CWGroup, NOT G name "guests", G name GN')
         self._check_rset_size(rset, 2, 1)
         self.assertUnorderedIterableEquals([gn for gn, in rset.rows],
                                            ['users', 'managers'])
--- a/goa/test/unittest_schema.py	Fri Apr 17 13:21:05 2009 +0200
+++ b/goa/test/unittest_schema.py	Fri Apr 17 16:55:37 2009 +0200
@@ -21,8 +21,8 @@
                              set(('Boolean', 'Bytes', 'Date', 'Datetime', 'Float',
                               'Decimal',
                               'Int', 'Interval', 'Password', 'String', 'Time',
-                              'EEType', 'EGroup', 'EPermission', 'EProperty', 'ERType',
-                              'EUser', 'EmailAddress',
+                              'CWEType', 'CWGroup', 'CWPermission', 'CWProperty', 'CWRType',
+                              'CWUser', 'EmailAddress',
                               'RQLExpression', 'State', 'Transition', 'TrInfo',
                               'Article', 'Blog', 'YamsEntity')))
         self.assertSetEquals(set(str(e) for e in schema.relations()),
@@ -66,7 +66,7 @@
                              ('ambiguous_relation', 'talks_about', 'identity'))
 
     def test_yams_imported(self):
-        eschema = self.schema['EProperty']
+        eschema = self.schema['CWProperty']
         # only relations defined in the class are actually ordered
         orels = [str(e) for e in eschema.ordered_relations()]
         orels, others = orels[:3], orels[3:]
@@ -87,7 +87,7 @@
                              ('Blog', 'Article'))
 
     def test_euser(self):
-        eschema = self.schema['EUser']
+        eschema = self.schema['CWUser']
         # XXX pretend to have some relations it has not
         self.assertEquals([str(e) for e in eschema.ordered_relations()],
                           ['login', 'firstname', 'surname', 'last_login_time',
--- a/goa/testlib.py	Fri Apr 17 13:21:05 2009 +0200
+++ b/goa/testlib.py	Fri Apr 17 16:55:37 2009 +0200
@@ -177,7 +177,7 @@
         
     def create_user(self, login, groups=('users',), req=None):
         assert not self.config['use-google-auth']
-        user = self.add_entity('EUser', upassword=str(login), login=unicode(login))
+        user = self.add_entity('CWUser', upassword=str(login), login=unicode(login))
         cu = self.session.cursor()
         cu.execute('SET X in_group G WHERE X eid %%(x)s, G name IN(%s)'
                     % ','.join(repr(g) for g in groups),
--- a/i18n/en.po	Fri Apr 17 13:21:05 2009 +0200
+++ b/i18n/en.po	Fri Apr 17 16:55:37 2009 +0200
@@ -227,70 +227,70 @@
 msgid "Do you want to delete the following element(s) ?"
 msgstr ""
 
-msgid "ECache"
-msgstr ""
-
-msgid "ECache_plural"
-msgstr ""
-
-msgid "EConstraint"
+msgid "CWCache"
+msgstr ""
+
+msgid "CWCache_plural"
+msgstr ""
+
+msgid "CWConstraint"
 msgstr "Constraint"
 
-msgid "EConstraintType"
+msgid "CWConstraintType"
 msgstr "Constraint type"
 
-msgid "EConstraintType_plural"
+msgid "CWConstraintType_plural"
 msgstr "Constraint types"
 
-msgid "EConstraint_plural"
+msgid "CWConstraint_plural"
 msgstr "Constraints"
 
-msgid "EEType"
+msgid "CWEType"
 msgstr "Entity type"
 
-msgid "EEType_plural"
+msgid "CWEType_plural"
 msgstr "Entity types"
 
-msgid "EFRDef"
+msgid "CWAttribute"
 msgstr "Attribute"
 
-msgid "EFRDef_plural"
+msgid "CWAttribute_plural"
 msgstr "Attributes"
 
-msgid "EGroup"
+msgid "CWGroup"
 msgstr "Group"
 
-msgid "EGroup_plural"
+msgid "CWGroup_plural"
 msgstr "Groups"
 
-msgid "ENFRDef"
+msgid "CWRelation"
 msgstr "Relation"
 
-msgid "ENFRDef_plural"
+msgid "CWRelation_plural"
 msgstr "Relations"
 
-msgid "EPermission"
+msgid "CWPermission"
 msgstr "Permission"
 
-msgid "EPermission_plural"
+msgid "CWPermission_plural"
 msgstr "Permissions"
 
-msgid "EProperty"
+msgid "CWProperty"
 msgstr "Property"
 
-msgid "EProperty_plural"
+msgid "CWProperty_plural"
 msgstr "Properties"
 
-msgid "ERType"
+msgid "CWRType"
 msgstr "Relation type"
 
-msgid "ERType_plural"
+msgid "CWRType_plural"
 msgstr "Relation types"
 
-msgid "EUser"
+msgid "CWUser"
 msgstr "User"
 
-msgid "EUser_plural"
+msgid "CWUser_plural"
 msgstr "Users"
 
 msgid "Email body: "
@@ -335,37 +335,37 @@
 msgid "New Card"
 msgstr "New card"
 
-msgid "New ECache"
-msgstr ""
-
-msgid "New EConstraint"
+msgid "New CWCache"
+msgstr ""
+
+msgid "New CWConstraint"
 msgstr "New constraint"
 
-msgid "New EConstraintType"
+msgid "New CWConstraintType"
 msgstr "New constraint type"
 
-msgid "New EEType"
+msgid "New CWEType"
 msgstr "New entity type"
 
-msgid "New EFRDef"
+msgid "New CWAttribute"
 msgstr "New attribute"
 
-msgid "New EGroup"
+msgid "New CWGroup"
 msgstr "New group"
 
-msgid "New ENFRDef"
+msgid "New CWRelation"
 msgstr "New relation"
 
-msgid "New EPermission"
+msgid "New CWPermission"
 msgstr "New permission"
 
-msgid "New EProperty"
+msgid "New CWProperty"
 msgstr "New property"
 
-msgid "New ERType"
+msgid "New CWRType"
 msgstr "New relation type"
 
-msgid "New EUser"
+msgid "New CWUser"
 msgstr "New user"
 
 msgid "New EmailAddress"
@@ -474,37 +474,37 @@
 msgid "This Card"
 msgstr "This card"
 
-msgid "This ECache"
-msgstr ""
-
-msgid "This EConstraint"
+msgid "This CWCache"
+msgstr ""
+
+msgid "This CWConstraint"
 msgstr "This constraint"
 
-msgid "This EConstraintType"
+msgid "This CWConstraintType"
 msgstr "This constraint type"
 
-msgid "This EEType"
+msgid "This CWEType"
 msgstr "This entity type"
 
-msgid "This EFRDef"
+msgid "This CWAttribute"
 msgstr "This attribute"
 
-msgid "This EGroup"
+msgid "This CWGroup"
 msgstr "This group"
 
-msgid "This ENFRDef"
+msgid "This CWRelation"
 msgstr "This relation"
 
-msgid "This EPermission"
+msgid "This CWPermission"
 msgstr "This permission"
 
-msgid "This EProperty"
+msgid "This CWProperty"
 msgstr "This property"
 
-msgid "This ERType"
+msgid "This CWRType"
 msgstr "This relation type"
 
-msgid "This EUser"
+msgid "This CWUser"
 msgstr "This user"
 
 msgid "This EmailAddress"
@@ -745,49 +745,49 @@
 msgid "add"
 msgstr ""
 
-msgid "add Bookmark bookmarked_by EUser object"
+msgid "add Bookmark bookmarked_by CWUser object"
 msgstr "bookmark"
 
-msgid "add EEType add_permission RQLExpression subject"
+msgid "add CWEType add_permission RQLExpression subject"
 msgstr "rql expression for the add permission"
 
-msgid "add EEType delete_permission RQLExpression subject"
+msgid "add CWEType delete_permission RQLExpression subject"
 msgstr "rql expression for the delete permission"
 
-msgid "add EEType read_permission RQLExpression subject"
+msgid "add CWEType read_permission RQLExpression subject"
 msgstr "rql expression for the read permission"
 
-msgid "add EEType update_permission RQLExpression subject"
+msgid "add CWEType update_permission RQLExpression subject"
 msgstr "rql expression for the update permission"
 
-msgid "add EFRDef constrained_by EConstraint subject"
+msgid "add CWAttribute constrained_by CWConstraint subject"
 msgstr "constraint"
 
-msgid "add EFRDef relation_type ERType object"
+msgid "add CWAttribute relation_type CWRType object"
 msgstr "attribute definition"
 
-msgid "add ENFRDef constrained_by EConstraint subject"
+msgid "add CWRelation constrained_by CWConstraint subject"
 msgstr "constraint"
 
-msgid "add ENFRDef relation_type ERType object"
+msgid "add CWRelation relation_type CWRType object"
 msgstr "relation definition"
 
-msgid "add EProperty for_user EUser object"
+msgid "add CWProperty for_user CWUser object"
 msgstr "property"
 
-msgid "add ERType add_permission RQLExpression subject"
+msgid "add CWRType add_permission RQLExpression subject"
 msgstr "rql expression for the add permission"
 
-msgid "add ERType delete_permission RQLExpression subject"
+msgid "add CWRType delete_permission RQLExpression subject"
 msgstr "rql expression for the delete permission"
 
-msgid "add ERType read_permission RQLExpression subject"
+msgid "add CWRType read_permission RQLExpression subject"
 msgstr "rql expression for the read permission"
 
-msgid "add EUser in_group EGroup object"
+msgid "add CWUser in_group CWGroup object"
 msgstr "user"
 
-msgid "add EUser use_email EmailAddress subject"
+msgid "add CWUser use_email EmailAddress subject"
 msgstr "email address"
 
 msgid "add State allowed_transition Transition object"
@@ -796,7 +796,7 @@
 msgid "add State allowed_transition Transition subject"
 msgstr "allowed transition"
 
-msgid "add State state_of EEType object"
+msgid "add State state_of CWEType object"
 msgstr "state"
 
 msgid "add Transition condition RQLExpression subject"
@@ -808,7 +808,7 @@
 msgid "add Transition destination_state State subject"
 msgstr "destination state"
 
-msgid "add Transition transition_of EEType object"
+msgid "add Transition transition_of CWEType object"
 msgstr "transition"
 
 msgid "add a Bookmark"
@@ -817,37 +817,37 @@
 msgid "add a Card"
 msgstr "add a card"
 
-msgid "add a ECache"
-msgstr ""
-
-msgid "add a EConstraint"
+msgid "add a CWCache"
+msgstr ""
+
+msgid "add a CWConstraint"
 msgstr "add a constraint"
 
-msgid "add a EConstraintType"
+msgid "add a CWConstraintType"
 msgstr "add a constraint type"
 
-msgid "add a EEType"
+msgid "add a CWEType"
 msgstr "add an entity type"
 
-msgid "add a EFRDef"
+msgid "add a CWAttribute"
 msgstr "add an attribute"
 
-msgid "add a EGroup"
+msgid "add a CWGroup"
 msgstr "add a group"
 
-msgid "add a ENFRDef"
+msgid "add a CWRelation"
 msgstr "add a relation"
 
-msgid "add a EPermission"
+msgid "add a CWPermission"
 msgstr "add a permission"
 
-msgid "add a EProperty"
+msgid "add a CWProperty"
 msgstr "add a property"
 
-msgid "add a ERType"
+msgid "add a CWRType"
 msgstr "add a relation type"
 
-msgid "add a EUser"
+msgid "add a CWUser"
 msgstr "add a user"
 
 msgid "add a EmailAddress"
@@ -1342,54 +1342,54 @@
 msgid "created_by_object"
 msgstr "has created"
 
-msgid "creating Bookmark (Bookmark bookmarked_by EUser %(linkto)s)"
+msgid "creating Bookmark (Bookmark bookmarked_by CWUser %(linkto)s)"
 msgstr "creating bookmark for %(linkto)s"
 
-msgid "creating EConstraint (EFRDef %(linkto)s constrained_by EConstraint)"
+msgid "creating CWConstraint (CWAttribute %(linkto)s constrained_by CWConstraint)"
 msgstr "creating constraint for attribute %(linkto)s"
 
-msgid "creating EConstraint (ENFRDef %(linkto)s constrained_by EConstraint)"
+msgid "creating CWConstraint (CWRelation %(linkto)s constrained_by CWConstraint)"
 msgstr "creating constraint for relation %(linkto)s"
 
-msgid "creating EFRDef (EFRDef relation_type ERType %(linkto)s)"
+msgid "creating CWAttribute (CWAttribute relation_type CWRType %(linkto)s)"
 msgstr "creating attribute %(linkto)s"
 
-msgid "creating ENFRDef (ENFRDef relation_type ERType %(linkto)s)"
+msgid "creating CWRelation (CWRelation relation_type CWRType %(linkto)s)"
 msgstr "creating relation %(linkto)s"
 
-msgid "creating EProperty (EProperty for_user EUser %(linkto)s)"
+msgid "creating CWProperty (CWProperty for_user CWUser %(linkto)s)"
 msgstr "creating property for user %(linkto)s"
 
-msgid "creating EUser (EUser in_group EGroup %(linkto)s)"
+msgid "creating CWUser (CWUser in_group CWGroup %(linkto)s)"
 msgstr "creating a new user in group %(linkto)s"
 
-msgid "creating EmailAddress (EUser %(linkto)s use_email EmailAddress)"
+msgid "creating EmailAddress (CWUser %(linkto)s use_email EmailAddress)"
 msgstr "creating email address for user %(linkto)s"
 
-msgid "creating RQLExpression (EEType %(linkto)s add_permission RQLExpression)"
+msgid "creating RQLExpression (CWEType %(linkto)s add_permission RQLExpression)"
 msgstr "creating rql expression for add permission on %(linkto)s"
 
 msgid ""
-"creating RQLExpression (EEType %(linkto)s delete_permission RQLExpression)"
+"creating RQLExpression (CWEType %(linkto)s delete_permission RQLExpression)"
 msgstr "creating rql expression for delete permission on %(linkto)s"
 
 msgid ""
-"creating RQLExpression (EEType %(linkto)s read_permission RQLExpression)"
+"creating RQLExpression (CWEType %(linkto)s read_permission RQLExpression)"
 msgstr "creating rql expression for read permission on %(linkto)s"
 
 msgid ""
-"creating RQLExpression (EEType %(linkto)s update_permission RQLExpression)"
+"creating RQLExpression (CWEType %(linkto)s update_permission RQLExpression)"
 msgstr "creating rql expression for update permission on %(linkto)s"
 
-msgid "creating RQLExpression (ERType %(linkto)s add_permission RQLExpression)"
+msgid "creating RQLExpression (CWRType %(linkto)s add_permission RQLExpression)"
 msgstr "creating rql expression for add permission on relations %(linkto)s"
 
 msgid ""
-"creating RQLExpression (ERType %(linkto)s delete_permission RQLExpression)"
+"creating RQLExpression (CWRType %(linkto)s delete_permission RQLExpression)"
 msgstr "creating rql expression for delete permission on relations %(linkto)s"
 
 msgid ""
-"creating RQLExpression (ERType %(linkto)s read_permission RQLExpression)"
+"creating RQLExpression (CWRType %(linkto)s read_permission RQLExpression)"
 msgstr "creating rql expression for read permission on relations %(linkto)s"
 
 msgid "creating RQLExpression (Transition %(linkto)s condition RQLExpression)"
@@ -1398,7 +1398,7 @@
 msgid "creating State (State allowed_transition Transition %(linkto)s)"
 msgstr "creating a state able to trigger transition %(linkto)s"
 
-msgid "creating State (State state_of EEType %(linkto)s)"
+msgid "creating State (State state_of CWEType %(linkto)s)"
 msgstr "creating state for the %(linkto)s entity type"
 
 msgid "creating State (Transition %(linkto)s destination_state State)"
@@ -1410,7 +1410,7 @@
 msgid "creating Transition (Transition destination_state State %(linkto)s)"
 msgstr "creating transition leading to state %(linkto)s"
 
-msgid "creating Transition (Transition transition_of EEType %(linkto)s)"
+msgid "creating Transition (Transition transition_of CWEType %(linkto)s)"
 msgstr "creating transition for the %(linkto)s entity type"
 
 msgid "creation"
@@ -2349,37 +2349,37 @@
 msgid "remove this Card"
 msgstr "remove this card"
 
-msgid "remove this ECache"
-msgstr ""
-
-msgid "remove this EConstraint"
+msgid "remove this CWCache"
+msgstr ""
+
+msgid "remove this CWConstraint"
 msgstr "remove this constraint"
 
-msgid "remove this EConstraintType"
+msgid "remove this CWConstraintType"
 msgstr "remove this constraint type"
 
-msgid "remove this EEType"
+msgid "remove this CWEType"
 msgstr "remove this entity type"
 
-msgid "remove this EFRDef"
+msgid "remove this CWAttribute"
 msgstr "remove this attribute"
 
-msgid "remove this EGroup"
+msgid "remove this CWGroup"
 msgstr "remove this group"
 
-msgid "remove this ENFRDef"
+msgid "remove this CWRelation"
 msgstr "remove this relation"
 
-msgid "remove this EPermission"
+msgid "remove this CWPermission"
 msgstr "remove this permission"
 
-msgid "remove this EProperty"
+msgid "remove this CWProperty"
 msgstr "remove this property"
 
-msgid "remove this ERType"
+msgid "remove this CWRType"
 msgstr "remove this relation type"
 
-msgid "remove this EUser"
+msgid "remove this CWUser"
 msgstr "remove this user"
 
 msgid "remove this EmailAddress"
--- a/i18n/es.po	Fri Apr 17 13:21:05 2009 +0200
+++ b/i18n/es.po	Fri Apr 17 16:55:37 2009 +0200
@@ -232,70 +232,70 @@
 msgid "Do you want to delete the following element(s) ?"
 msgstr "Desea suprimir el(los) elemento(s) siguiente(s)"
 
-msgid "ECache"
+msgid "CWCache"
 msgstr "Memoria Cache"
 
-msgid "ECache_plural"
+msgid "CWCache_plural"
 msgstr "Memorias Caches"
 
-msgid "EConstraint"
+msgid "CWConstraint"
 msgstr "Condición"
 
-msgid "EConstraintType"
+msgid "CWConstraintType"
 msgstr "Tipo de condición"
 
-msgid "EConstraintType_plural"
+msgid "CWConstraintType_plural"
 msgstr "Tipos de condición"
 
-msgid "EConstraint_plural"
+msgid "CWConstraint_plural"
 msgstr "Condiciones"
 
-msgid "EEType"
+msgid "CWEType"
 msgstr "Tipo de entidades"
 
-msgid "EEType_plural"
+msgid "CWEType_plural"
 msgstr "Tipos de entidades"
 
-msgid "EFRDef"
+msgid "CWAttribute"
 msgstr "Atributo"
 
-msgid "EFRDef_plural"
+msgid "CWAttribute_plural"
 msgstr "Atributos"
 
-msgid "EGroup"
+msgid "CWGroup"
 msgstr "Groupo"
 
-msgid "EGroup_plural"
+msgid "CWGroup_plural"
 msgstr "Groupos"
 
-msgid "ENFRDef"
+msgid "CWRelation"
 msgstr "Relación"
 
-msgid "ENFRDef_plural"
+msgid "CWRelation_plural"
 msgstr "Relaciones"
 
-msgid "EPermission"
+msgid "CWPermission"
 msgstr "Autorización"
 
-msgid "EPermission_plural"
+msgid "CWPermission_plural"
 msgstr "Autorizaciones"
 
-msgid "EProperty"
+msgid "CWProperty"
 msgstr "Propiedad"
 
-msgid "EProperty_plural"
+msgid "CWProperty_plural"
 msgstr "Propiedades"
 
-msgid "ERType"
+msgid "CWRType"
 msgstr "Tipo de relación"
 
-msgid "ERType_plural"
+msgid "CWRType_plural"
 msgstr "Tipos de relación"
 
-msgid "EUser"
+msgid "CWUser"
 msgstr "Usuario"
 
-msgid "EUser_plural"
+msgid "CWUser_plural"
 msgstr "Usuarios"
 
 msgid "Email body: "
@@ -340,37 +340,37 @@
 msgid "New Card"
 msgstr "Nueva ficha"
 
-msgid "New ECache"
+msgid "New CWCache"
 msgstr "Nueva memoria cache"
 
-msgid "New EConstraint"
+msgid "New CWConstraint"
 msgstr "Nueva condición"
 
-msgid "New EConstraintType"
+msgid "New CWConstraintType"
 msgstr "Nuevo tipo de condición"
 
-msgid "New EEType"
+msgid "New CWEType"
 msgstr "Nuevo tipo de entidad"
 
-msgid "New EFRDef"
+msgid "New CWAttribute"
 msgstr "Nueva definición de relación final"
 
-msgid "New EGroup"
+msgid "New CWGroup"
 msgstr "Nuevo grupo"
 
-msgid "New ENFRDef"
+msgid "New CWRelation"
 msgstr "Nueva definición de relación final"
 
-msgid "New EPermission"
+msgid "New CWPermission"
 msgstr "Nueva autorización"
 
-msgid "New EProperty"
+msgid "New CWProperty"
 msgstr "Nueva Propiedad"
 
-msgid "New ERType"
+msgid "New CWRType"
 msgstr "Nuevo tipo de relación"
 
-msgid "New EUser"
+msgid "New CWUser"
 msgstr "Nuevo usuario"
 
 msgid "New EmailAddress"
@@ -479,37 +479,37 @@
 msgid "This Card"
 msgstr "Esta Ficha"
 
-msgid "This ECache"
+msgid "This CWCache"
 msgstr "Esta Memoria Cache"
 
-msgid "This EConstraint"
+msgid "This CWConstraint"
 msgstr "Esta condición"
 
-msgid "This EConstraintType"
+msgid "This CWConstraintType"
 msgstr "Este tipo de condición"
 
-msgid "This EEType"
+msgid "This CWEType"
 msgstr "Este tipo de Entidad"
 
-msgid "This EFRDef"
+msgid "This CWAttribute"
 msgstr "Esta definición de relación final"
 
-msgid "This EGroup"
+msgid "This CWGroup"
 msgstr "Este grupo"
 
-msgid "This ENFRDef"
+msgid "This CWRelation"
 msgstr "Esta definición de relación no final"
 
-msgid "This EPermission"
+msgid "This CWPermission"
 msgstr "Esta autorización"
 
-msgid "This EProperty"
+msgid "This CWProperty"
 msgstr "Esta propiedad"
 
-msgid "This ERType"
+msgid "This CWRType"
 msgstr "Este tipo de relación"
 
-msgid "This EUser"
+msgid "This CWUser"
 msgstr "Este usuario"
 
 msgid "This EmailAddress"
@@ -766,49 +766,49 @@
 msgid "add"
 msgstr "agregar"
 
-msgid "add Bookmark bookmarked_by EUser object"
+msgid "add Bookmark bookmarked_by CWUser object"
 msgstr ""
 
-msgid "add EEType add_permission RQLExpression subject"
+msgid "add CWEType add_permission RQLExpression subject"
 msgstr "Definir una expresión RQL de agregación"
 
-msgid "add EEType delete_permission RQLExpression subject"
+msgid "add CWEType delete_permission RQLExpression subject"
 msgstr "Definir una expresión RQL de eliminación"
 
-msgid "add EEType read_permission RQLExpression subject"
+msgid "add CWEType read_permission RQLExpression subject"
 msgstr "Definir una expresión RQL de lectura"
 
-msgid "add EEType update_permission RQLExpression subject"
+msgid "add CWEType update_permission RQLExpression subject"
 msgstr "Definir una expresión RQL de actualización"
 
-msgid "add EFRDef constrained_by EConstraint subject"
+msgid "add CWAttribute constrained_by CWConstraint subject"
 msgstr "condición"
 
-msgid "add EFRDef relation_type ERType object"
+msgid "add CWAttribute relation_type CWRType object"
 msgstr "definición de atributo"
 
-msgid "add ENFRDef constrained_by EConstraint subject"
+msgid "add CWRelation constrained_by CWConstraint subject"
 msgstr "condición"
 
-msgid "add ENFRDef relation_type ERType object"
+msgid "add CWRelation relation_type CWRType object"
 msgstr "definición de relación"
 
-msgid "add EProperty for_user EUser object"
+msgid "add CWProperty for_user CWUser object"
 msgstr "propiedad"
 
-msgid "add ERType add_permission RQLExpression subject"
+msgid "add CWRType add_permission RQLExpression subject"
 msgstr "expresión RQL de agregación"
 
-msgid "add ERType delete_permission RQLExpression subject"
+msgid "add CWRType delete_permission RQLExpression subject"
 msgstr "expresión RQL de eliminación"
 
-msgid "add ERType read_permission RQLExpression subject"
+msgid "add CWRType read_permission RQLExpression subject"
 msgstr "expresión RQL de lectura"
 
-msgid "add EUser in_group EGroup object"
+msgid "add CWUser in_group CWGroup object"
 msgstr "usuario"
 
-msgid "add EUser use_email EmailAddress subject"
+msgid "add CWUser use_email EmailAddress subject"
 msgstr "agregar email"
 
 msgid "add State allowed_transition Transition object"
@@ -817,7 +817,7 @@
 msgid "add State allowed_transition Transition subject"
 msgstr "agregar una transición en salida"
 
-msgid "add State state_of EEType object"
+msgid "add State state_of CWEType object"
 msgstr "agregar un estado"
 
 msgid "add Transition condition RQLExpression subject"
@@ -829,7 +829,7 @@
 msgid "add Transition destination_state State subject"
 msgstr "agregar el estado de salida"
 
-msgid "add Transition transition_of EEType object"
+msgid "add Transition transition_of CWEType object"
 msgstr "agregar una transición"
 
 msgid "add a Bookmark"
@@ -838,37 +838,37 @@
 msgid "add a Card"
 msgstr "agregar una ficha"
 
-msgid "add a ECache"
+msgid "add a CWCache"
 msgstr "agregar una memoria cache"
 
-msgid "add a EConstraint"
+msgid "add a CWConstraint"
 msgstr "agregar una condición"
 
-msgid "add a EConstraintType"
+msgid "add a CWConstraintType"
 msgstr "aun tipo de condición"
 
-msgid "add a EEType"
+msgid "add a CWEType"
 msgstr "agregar un tipo de entidad"
 
-msgid "add a EFRDef"
+msgid "add a CWAttribute"
 msgstr "agregar un tipo de relación"
 
-msgid "add a EGroup"
+msgid "add a CWGroup"
 msgstr "agregar un grupo de usuarios"
 
-msgid "add a ENFRDef"
+msgid "add a CWRelation"
 msgstr "agregar una relación"
 
-msgid "add a EPermission"
+msgid "add a CWPermission"
 msgstr "agregar una autorización"
 
-msgid "add a EProperty"
+msgid "add a CWProperty"
 msgstr "agregar una propiedad"
 
-msgid "add a ERType"
+msgid "add a CWRType"
 msgstr "agregar un tipo de relación"
 
-msgid "add a EUser"
+msgid "add a CWUser"
 msgstr "agregar un usuario"
 
 msgid "add a EmailAddress"
@@ -1390,61 +1390,61 @@
 msgid "created_by_object"
 msgstr "ha creado"
 
-msgid "creating Bookmark (Bookmark bookmarked_by EUser %(linkto)s)"
+msgid "creating Bookmark (Bookmark bookmarked_by CWUser %(linkto)s)"
 msgstr ""
 
-msgid "creating EConstraint (EFRDef %(linkto)s constrained_by EConstraint)"
+msgid "creating CWConstraint (CWAttribute %(linkto)s constrained_by CWConstraint)"
 msgstr "creación condicionada por el atributo %(linkto)s"
 
-msgid "creating EConstraint (ENFRDef %(linkto)s constrained_by EConstraint)"
+msgid "creating CWConstraint (CWRelation %(linkto)s constrained_by CWConstraint)"
 msgstr "creación condicionada por la relación %(linkto)s"
 
-msgid "creating EFRDef (EFRDef relation_type ERType %(linkto)s)"
+msgid "creating CWAttribute (CWAttribute relation_type CWRType %(linkto)s)"
 msgstr "creación atributo %(linkto)s"
 
-msgid "creating ENFRDef (ENFRDef relation_type ERType %(linkto)s)"
+msgid "creating CWRelation (CWRelation relation_type CWRType %(linkto)s)"
 msgstr "creación relación %(linkto)s"
 
-msgid "creating EProperty (EProperty for_user EUser %(linkto)s)"
+msgid "creating CWProperty (CWProperty for_user CWUser %(linkto)s)"
 msgstr "creación de una propiedad por el usuario %(linkto)s"
 
-msgid "creating EUser (EUser in_group EGroup %(linkto)s)"
+msgid "creating CWUser (CWUser in_group CWGroup %(linkto)s)"
 msgstr "creación de un usuario para agregar al grupo %(linkto)s"
 
-msgid "creating EmailAddress (EUser %(linkto)s use_email EmailAddress)"
+msgid "creating EmailAddress (CWUser %(linkto)s use_email EmailAddress)"
 msgstr "creación de una dirección electrónica para el usuario %(linkto)s"
 
-msgid "creating RQLExpression (EEType %(linkto)s add_permission RQLExpression)"
+msgid "creating RQLExpression (CWEType %(linkto)s add_permission RQLExpression)"
 msgstr ""
 "creación de una expresión RQL para la autorización de agregar %(linkto)s"
 
 msgid ""
-"creating RQLExpression (EEType %(linkto)s delete_permission RQLExpression)"
+"creating RQLExpression (CWEType %(linkto)s delete_permission RQLExpression)"
 msgstr ""
 "creación de una expresión RQL para la autorización de eliminar %(linkto)s"
 
 msgid ""
-"creating RQLExpression (EEType %(linkto)s read_permission RQLExpression)"
+"creating RQLExpression (CWEType %(linkto)s read_permission RQLExpression)"
 msgstr "creación de una expresión RQL para la autorización de leer %(linkto)s"
 
 msgid ""
-"creating RQLExpression (EEType %(linkto)s update_permission RQLExpression)"
+"creating RQLExpression (CWEType %(linkto)s update_permission RQLExpression)"
 msgstr ""
 "creación de una expresión RQL para la autorización de actualizar %(linkto)s"
 
-msgid "creating RQLExpression (ERType %(linkto)s add_permission RQLExpression)"
+msgid "creating RQLExpression (CWRType %(linkto)s add_permission RQLExpression)"
 msgstr ""
 "creación de una expresión RQL para la autorización de agregar relaciones %"
 "(linkto)s"
 
 msgid ""
-"creating RQLExpression (ERType %(linkto)s delete_permission RQLExpression)"
+"creating RQLExpression (CWRType %(linkto)s delete_permission RQLExpression)"
 msgstr ""
 "creación de una expresión RQL para autorizar la eliminación de relaciones %"
 "(linkto)s"
 
 msgid ""
-"creating RQLExpression (ERType %(linkto)s read_permission RQLExpression)"
+"creating RQLExpression (CWRType %(linkto)s read_permission RQLExpression)"
 msgstr ""
 "creación de una expresión RQL para autorizar la lectura de relaciones %"
 "(linkto)s"
@@ -1455,7 +1455,7 @@
 msgid "creating State (State allowed_transition Transition %(linkto)s)"
 msgstr "creación de un estado que pueda ir hacia la transición %(linkto)s"
 
-msgid "creating State (State state_of EEType %(linkto)s)"
+msgid "creating State (State state_of CWEType %(linkto)s)"
 msgstr "creación de un estado por el tipo %(linkto)s"
 
 msgid "creating State (Transition %(linkto)s destination_state State)"
@@ -1467,7 +1467,7 @@
 msgid "creating Transition (Transition destination_state State %(linkto)s)"
 msgstr "creación de un transición hacia el estado %(linkto)s"
 
-msgid "creating Transition (Transition transition_of EEType %(linkto)s)"
+msgid "creating Transition (Transition transition_of CWEType %(linkto)s)"
 msgstr "creación de una transición para el tipo %(linkto)s"
 
 msgid "creation"
@@ -2442,37 +2442,37 @@
 msgid "remove this Card"
 msgstr "supprimer cette fiche"
 
-msgid "remove this ECache"
+msgid "remove this CWCache"
 msgstr "supprimer ce cache applicatif"
 
-msgid "remove this EConstraint"
+msgid "remove this CWConstraint"
 msgstr "supprimer cette contrainte"
 
-msgid "remove this EConstraintType"
+msgid "remove this CWConstraintType"
 msgstr "supprimer ce type de contrainte"
 
-msgid "remove this EEType"
+msgid "remove this CWEType"
 msgstr "supprimer ce type d'entitÈ"
 
-msgid "remove this EFRDef"
+msgid "remove this CWAttribute"
 msgstr "supprimer cet attribut"
 
-msgid "remove this EGroup"
+msgid "remove this CWGroup"
 msgstr "supprimer ce groupe"
 
-msgid "remove this ENFRDef"
+msgid "remove this CWRelation"
 msgstr "supprimer cette relation"
 
-msgid "remove this EPermission"
+msgid "remove this CWPermission"
 msgstr "supprimer cette permission"
 
-msgid "remove this EProperty"
+msgid "remove this CWProperty"
 msgstr "supprimer cette propriÈtÈ"
 
-msgid "remove this ERType"
+msgid "remove this CWRType"
 msgstr "supprimer cette dÈfinition de relation"
 
-msgid "remove this EUser"
+msgid "remove this CWUser"
 msgstr "supprimer cet utilisateur"
 
 msgid "remove this EmailAddress"
--- a/i18n/fr.po	Fri Apr 17 13:21:05 2009 +0200
+++ b/i18n/fr.po	Fri Apr 17 16:55:37 2009 +0200
@@ -232,70 +232,70 @@
 msgid "Do you want to delete the following element(s) ?"
 msgstr "Voulez vous supprimer le(s) élément(s) suivant(s)"
 
-msgid "ECache"
+msgid "CWCache"
 msgstr "Cache applicatif"
 
-msgid "ECache_plural"
+msgid "CWCache_plural"
 msgstr "Caches applicatifs"
 
-msgid "EConstraint"
+msgid "CWConstraint"
 msgstr "Contrainte"
 
-msgid "EConstraintType"
+msgid "CWConstraintType"
 msgstr "Type de contrainte"
 
-msgid "EConstraintType_plural"
+msgid "CWConstraintType_plural"
 msgstr "Types de contrainte"
 
-msgid "EConstraint_plural"
+msgid "CWConstraint_plural"
 msgstr "Contraintes"
 
-msgid "EEType"
+msgid "CWEType"
 msgstr "Type d'entité"
 
-msgid "EEType_plural"
+msgid "CWEType_plural"
 msgstr "Types d'entité"
 
-msgid "EFRDef"
+msgid "CWAttribute"
 msgstr "Attribut"
 
-msgid "EFRDef_plural"
+msgid "CWAttribute_plural"
 msgstr "Attributs"
 
-msgid "EGroup"
+msgid "CWGroup"
 msgstr "Groupe"
 
-msgid "EGroup_plural"
+msgid "CWGroup_plural"
 msgstr "Groupes"
 
-msgid "ENFRDef"
+msgid "CWRelation"
 msgstr "Relation"
 
-msgid "ENFRDef_plural"
+msgid "CWRelation_plural"
 msgstr "Relations"
 
-msgid "EPermission"
+msgid "CWPermission"
 msgstr "Permission"
 
-msgid "EPermission_plural"
+msgid "CWPermission_plural"
 msgstr "Permissions"
 
-msgid "EProperty"
+msgid "CWProperty"
 msgstr "Propriété"
 
-msgid "EProperty_plural"
+msgid "CWProperty_plural"
 msgstr "Propriétés"
 
-msgid "ERType"
+msgid "CWRType"
 msgstr "Type de relation"
 
-msgid "ERType_plural"
+msgid "CWRType_plural"
 msgstr "Types de relation"
 
-msgid "EUser"
+msgid "CWUser"
 msgstr "Utilisateur"
 
-msgid "EUser_plural"
+msgid "CWUser_plural"
 msgstr "Utilisateurs"
 
 msgid "Email body: "
@@ -340,37 +340,37 @@
 msgid "New Card"
 msgstr "Nouvelle fiche"
 
-msgid "New ECache"
+msgid "New CWCache"
 msgstr "Nouveau cache applicatif"
 
-msgid "New EConstraint"
+msgid "New CWConstraint"
 msgstr "Nouvelle contrainte"
 
-msgid "New EConstraintType"
+msgid "New CWConstraintType"
 msgstr "Nouveau type de contrainte"
 
-msgid "New EEType"
+msgid "New CWEType"
 msgstr "Nouveau type d'entité"
 
-msgid "New EFRDef"
+msgid "New CWAttribute"
 msgstr "Nouvelle définition de relation finale"
 
-msgid "New EGroup"
+msgid "New CWGroup"
 msgstr "Nouveau groupe"
 
-msgid "New ENFRDef"
+msgid "New CWRelation"
 msgstr "Nouvelle définition de relation non finale"
 
-msgid "New EPermission"
+msgid "New CWPermission"
 msgstr "Nouvelle permission"
 
-msgid "New EProperty"
+msgid "New CWProperty"
 msgstr "Nouvelle propriété"
 
-msgid "New ERType"
+msgid "New CWRType"
 msgstr "Nouveau type de relation"
 
-msgid "New EUser"
+msgid "New CWUser"
 msgstr "Nouvel utilisateur"
 
 msgid "New EmailAddress"
@@ -479,37 +479,37 @@
 msgid "This Card"
 msgstr "Cette fiche"
 
-msgid "This ECache"
+msgid "This CWCache"
 msgstr "Ce cache applicatif"
 
-msgid "This EConstraint"
+msgid "This CWConstraint"
 msgstr "Cette contrainte"
 
-msgid "This EConstraintType"
+msgid "This CWConstraintType"
 msgstr "Ce type de contrainte"
 
-msgid "This EEType"
+msgid "This CWEType"
 msgstr "Ce type d'entité"
 
-msgid "This EFRDef"
+msgid "This CWAttribute"
 msgstr "Cette définition de relation finale"
 
-msgid "This EGroup"
+msgid "This CWGroup"
 msgstr "Ce groupe"
 
-msgid "This ENFRDef"
+msgid "This CWRelation"
 msgstr "Cette définition de relation non finale"
 
-msgid "This EPermission"
+msgid "This CWPermission"
 msgstr "Cette permission"
 
-msgid "This EProperty"
+msgid "This CWProperty"
 msgstr "Cette propriété"
 
-msgid "This ERType"
+msgid "This CWRType"
 msgstr "Ce type de relation"
 
-msgid "This EUser"
+msgid "This CWUser"
 msgstr "Cet utilisateur"
 
 msgid "This EmailAddress"
@@ -768,49 +768,49 @@
 msgid "add"
 msgstr "ajouter"
 
-msgid "add Bookmark bookmarked_by EUser object"
+msgid "add Bookmark bookmarked_by CWUser object"
 msgstr "signet"
 
-msgid "add EEType add_permission RQLExpression subject"
+msgid "add CWEType add_permission RQLExpression subject"
 msgstr "définir une expression RQL d'ajout"
 
-msgid "add EEType delete_permission RQLExpression subject"
+msgid "add CWEType delete_permission RQLExpression subject"
 msgstr "définir une expression RQL de suppression"
 
-msgid "add EEType read_permission RQLExpression subject"
+msgid "add CWEType read_permission RQLExpression subject"
 msgstr "définir une expression RQL de lecture"
 
-msgid "add EEType update_permission RQLExpression subject"
+msgid "add CWEType update_permission RQLExpression subject"
 msgstr "définir une expression RQL de mise à jour"
 
-msgid "add EFRDef constrained_by EConstraint subject"
+msgid "add CWAttribute constrained_by CWConstraint subject"
 msgstr "contrainte"
 
-msgid "add EFRDef relation_type ERType object"
+msgid "add CWAttribute relation_type CWRType object"
 msgstr "définition d'attribut"
 
-msgid "add ENFRDef constrained_by EConstraint subject"
+msgid "add CWRelation constrained_by CWConstraint subject"
 msgstr "contrainte"
 
-msgid "add ENFRDef relation_type ERType object"
+msgid "add CWRelation relation_type CWRType object"
 msgstr "définition de relation"
 
-msgid "add EProperty for_user EUser object"
+msgid "add CWProperty for_user CWUser object"
 msgstr "propriété"
 
-msgid "add ERType add_permission RQLExpression subject"
+msgid "add CWRType add_permission RQLExpression subject"
 msgstr "expression RQL d'ajout"
 
-msgid "add ERType delete_permission RQLExpression subject"
+msgid "add CWRType delete_permission RQLExpression subject"
 msgstr "expression RQL de suppression"
 
-msgid "add ERType read_permission RQLExpression subject"
+msgid "add CWRType read_permission RQLExpression subject"
 msgstr "expression RQL de lecture"
 
-msgid "add EUser in_group EGroup object"
+msgid "add CWUser in_group CWGroup object"
 msgstr "utilisateur"
 
-msgid "add EUser use_email EmailAddress subject"
+msgid "add CWUser use_email EmailAddress subject"
 msgstr "ajouter une addresse email"
 
 msgid "add State allowed_transition Transition object"
@@ -819,7 +819,7 @@
 msgid "add State allowed_transition Transition subject"
 msgstr "ajouter une transition en sortie"
 
-msgid "add State state_of EEType object"
+msgid "add State state_of CWEType object"
 msgstr "ajouter un état"
 
 msgid "add Transition condition RQLExpression subject"
@@ -831,7 +831,7 @@
 msgid "add Transition destination_state State subject"
 msgstr "ajouter l'état de sortie"
 
-msgid "add Transition transition_of EEType object"
+msgid "add Transition transition_of CWEType object"
 msgstr "ajouter une transition"
 
 msgid "add a Bookmark"
@@ -840,37 +840,37 @@
 msgid "add a Card"
 msgstr "ajouter une fiche"
 
-msgid "add a ECache"
+msgid "add a CWCache"
 msgstr "ajouter un cache applicatif"
 
-msgid "add a EConstraint"
+msgid "add a CWConstraint"
 msgstr "ajouter une contrainte"
 
-msgid "add a EConstraintType"
+msgid "add a CWConstraintType"
 msgstr "ajouter un type de contrainte"
 
-msgid "add a EEType"
+msgid "add a CWEType"
 msgstr "ajouter un type d'entité"
 
-msgid "add a EFRDef"
+msgid "add a CWAttribute"
 msgstr "ajouter un type de relation"
 
-msgid "add a EGroup"
+msgid "add a CWGroup"
 msgstr "ajouter un groupe d'utilisateurs"
 
-msgid "add a ENFRDef"
+msgid "add a CWRelation"
 msgstr "ajouter une relation"
 
-msgid "add a EPermission"
+msgid "add a CWPermission"
 msgstr "ajouter une permission"
 
-msgid "add a EProperty"
+msgid "add a CWProperty"
 msgstr "ajouter une propriété"
 
-msgid "add a ERType"
+msgid "add a CWRType"
 msgstr "ajouter un type de relation"
 
-msgid "add a EUser"
+msgid "add a CWUser"
 msgstr "ajouter un utilisateur"
 
 msgid "add a EmailAddress"
@@ -1392,60 +1392,60 @@
 msgid "created_by_object"
 msgstr "a créé"
 
-msgid "creating Bookmark (Bookmark bookmarked_by EUser %(linkto)s)"
+msgid "creating Bookmark (Bookmark bookmarked_by CWUser %(linkto)s)"
 msgstr "création d'un signet pour %(linkto)s"
 
-msgid "creating EConstraint (EFRDef %(linkto)s constrained_by EConstraint)"
+msgid "creating CWConstraint (CWAttribute %(linkto)s constrained_by CWConstraint)"
 msgstr "création d'une contrainte pour l'attribut %(linkto)s"
 
-msgid "creating EConstraint (ENFRDef %(linkto)s constrained_by EConstraint)"
+msgid "creating CWConstraint (CWRelation %(linkto)s constrained_by CWConstraint)"
 msgstr "création d'une contrainte pour la relation %(linkto)s"
 
-msgid "creating EFRDef (EFRDef relation_type ERType %(linkto)s)"
+msgid "creating CWAttribute (CWAttribute relation_type CWRType %(linkto)s)"
 msgstr "création d'un attribut %(linkto)s"
 
-msgid "creating ENFRDef (ENFRDef relation_type ERType %(linkto)s)"
+msgid "creating CWRelation (CWRelation relation_type CWRType %(linkto)s)"
 msgstr "création relation %(linkto)s"
 
-msgid "creating EProperty (EProperty for_user EUser %(linkto)s)"
+msgid "creating CWProperty (CWProperty for_user CWUser %(linkto)s)"
 msgstr "création d'une propriété pour l'utilisateur %(linkto)s"
 
-msgid "creating EUser (EUser in_group EGroup %(linkto)s)"
+msgid "creating CWUser (CWUser in_group CWGroup %(linkto)s)"
 msgstr "création d'un utilisateur à rajouter au groupe %(linkto)s"
 
-msgid "creating EmailAddress (EUser %(linkto)s use_email EmailAddress)"
+msgid "creating EmailAddress (CWUser %(linkto)s use_email EmailAddress)"
 msgstr "création d'une adresse électronique pour l'utilisateur %(linkto)s"
 
-msgid "creating RQLExpression (EEType %(linkto)s add_permission RQLExpression)"
+msgid "creating RQLExpression (CWEType %(linkto)s add_permission RQLExpression)"
 msgstr "création d'une expression RQL pour la permission d'ajout de %(linkto)s"
 
 msgid ""
-"creating RQLExpression (EEType %(linkto)s delete_permission RQLExpression)"
+"creating RQLExpression (CWEType %(linkto)s delete_permission RQLExpression)"
 msgstr ""
 "création d'une expression RQL pour la permission de suppression de %(linkto)s"
 
 msgid ""
-"creating RQLExpression (EEType %(linkto)s read_permission RQLExpression)"
+"creating RQLExpression (CWEType %(linkto)s read_permission RQLExpression)"
 msgstr "création d'une expression RQL pour la permission de lire %(linkto)s"
 
 msgid ""
-"creating RQLExpression (EEType %(linkto)s update_permission RQLExpression)"
+"creating RQLExpression (CWEType %(linkto)s update_permission RQLExpression)"
 msgstr ""
 "création d'une expression RQL pour la permission de mise à jour de %(linkto)s"
 
-msgid "creating RQLExpression (ERType %(linkto)s add_permission RQLExpression)"
+msgid "creating RQLExpression (CWRType %(linkto)s add_permission RQLExpression)"
 msgstr ""
 "création d'une expression RQL pour la permission d'ajout des relations %"
 "(linkto)s"
 
 msgid ""
-"creating RQLExpression (ERType %(linkto)s delete_permission RQLExpression)"
+"creating RQLExpression (CWRType %(linkto)s delete_permission RQLExpression)"
 msgstr ""
 "création d'une expression RQL pour la permission de suppression des "
 "relations %(linkto)s"
 
 msgid ""
-"creating RQLExpression (ERType %(linkto)s read_permission RQLExpression)"
+"creating RQLExpression (CWRType %(linkto)s read_permission RQLExpression)"
 msgstr ""
 "création d'une expression RQL pour la permission de lire les relations %"
 "(linkto)s"
@@ -1456,7 +1456,7 @@
 msgid "creating State (State allowed_transition Transition %(linkto)s)"
 msgstr "création d'un état pouvant aller vers la transition %(linkto)s"
 
-msgid "creating State (State state_of EEType %(linkto)s)"
+msgid "creating State (State state_of CWEType %(linkto)s)"
 msgstr "création d'un état pour le type %(linkto)s"
 
 msgid "creating State (Transition %(linkto)s destination_state State)"
@@ -1468,7 +1468,7 @@
 msgid "creating Transition (Transition destination_state State %(linkto)s)"
 msgstr "création d'une transition vers l'état %(linkto)s"
 
-msgid "creating Transition (Transition transition_of EEType %(linkto)s)"
+msgid "creating Transition (Transition transition_of CWEType %(linkto)s)"
 msgstr "création d'une transition pour le type %(linkto)s"
 
 msgid "creation"
@@ -2446,37 +2446,37 @@
 msgid "remove this Card"
 msgstr "supprimer cette fiche"
 
-msgid "remove this ECache"
+msgid "remove this CWCache"
 msgstr "supprimer ce cache applicatif"
 
-msgid "remove this EConstraint"
+msgid "remove this CWConstraint"
 msgstr "supprimer cette contrainte"
 
-msgid "remove this EConstraintType"
+msgid "remove this CWConstraintType"
 msgstr "supprimer ce type de contrainte"
 
-msgid "remove this EEType"
+msgid "remove this CWEType"
 msgstr "supprimer ce type d'entité"
 
-msgid "remove this EFRDef"
+msgid "remove this CWAttribute"
 msgstr "supprimer cet attribut"
 
-msgid "remove this EGroup"
+msgid "remove this CWGroup"
 msgstr "supprimer ce groupe"
 
-msgid "remove this ENFRDef"
+msgid "remove this CWRelation"
 msgstr "supprimer cette relation"
 
-msgid "remove this EPermission"
+msgid "remove this CWPermission"
 msgstr "supprimer cette permission"
 
-msgid "remove this EProperty"
+msgid "remove this CWProperty"
 msgstr "supprimer cette propriété"
 
-msgid "remove this ERType"
+msgid "remove this CWRType"
 msgstr "supprimer cette définition de relation"
 
-msgid "remove this EUser"
+msgid "remove this CWUser"
 msgstr "supprimer cet utilisateur"
 
 msgid "remove this EmailAddress"
--- a/misc/migration/2.42.1_Any.py	Fri Apr 17 13:21:05 2009 +0200
+++ b/misc/migration/2.42.1_Any.py	Fri Apr 17 16:55:37 2009 +0200
@@ -14,5 +14,5 @@
 
 if 'inline_view' in schema:
     # inline_view attribute should have been deleted for a while now....
-    drop_attribute('ENFRDef', 'inline_view')
+    drop_attribute('CWRelation', 'inline_view')
     
--- a/misc/migration/2.44.0_Any.py	Fri Apr 17 13:21:05 2009 +0200
+++ b/misc/migration/2.44.0_Any.py	Fri Apr 17 16:55:37 2009 +0200
@@ -1,7 +1,7 @@
-change_relation_props('EFRDef', 'cardinality', 'String', internationalizable=True)
-change_relation_props('ENFRDef', 'cardinality', 'String', internationalizable=True)
+change_relation_props('CWAttribute', 'cardinality', 'String', internationalizable=True)
+change_relation_props('CWRelation', 'cardinality', 'String', internationalizable=True)
 
-drop_relation_definition('EPermission', 'require_state', 'State')
+drop_relation_definition('CWPermission', 'require_state', 'State')
 
 if confirm('cleanup require_permission relation'):
     try:
--- a/misc/migration/2.48.8_Any.py	Fri Apr 17 13:21:05 2009 +0200
+++ b/misc/migration/2.48.8_Any.py	Fri Apr 17 16:55:37 2009 +0200
@@ -1,2 +1,2 @@
-for etype in ('ERType', 'EFRDef', 'ENFRDef', 'EConstraint', 'EConstraintType'):
+for etype in ('CWRType', 'CWAttribute', 'CWRelation', 'CWConstraint', 'CWConstraintType'):
     synchronize_permissions(etype)
--- a/misc/migration/2.99.0_Any.py	Fri Apr 17 13:21:05 2009 +0200
+++ b/misc/migration/2.99.0_Any.py	Fri Apr 17 16:55:37 2009 +0200
@@ -1,6 +1,6 @@
 from cubicweb import CW_MIGRATION_MAP
 
-for pk, in rql('Any K WHERE X is EProperty, X pkey IN (%s), X pkey K'
+for pk, in rql('Any K WHERE X is CWProperty, X pkey IN (%s), X pkey K'
                % ','.join("'system.version.%s'" % cube for cube in CW_MIGRATION_MAP),
                ask_confirm=False):
     cube = pk.split('.')[-1]
@@ -9,4 +9,4 @@
         {'oldk': pk, 'newk': newk}, ask_confirm=False)
     print 'renamed', pk, 'to', newk
 
-add_entity_type('ECache')
+add_entity_type('CWCache')
--- a/misc/migration/3.2.0_Any.py	Fri Apr 17 13:21:05 2009 +0200
+++ b/misc/migration/3.2.0_Any.py	Fri Apr 17 16:55:37 2009 +0200
@@ -1,3 +1,3 @@
-rql('SET X value "main-template" WHERE X is EProperty, '
+rql('SET X value "main-template" WHERE X is CWProperty, '
     'X pkey "ui.main-template", X value "main"')
 checkpoint()
--- a/misc/migration/bootstrapmigration_repository.py	Fri Apr 17 13:21:05 2009 +0200
+++ b/misc/migration/bootstrapmigration_repository.py	Fri Apr 17 16:55:37 2009 +0200
@@ -3,7 +3,7 @@
 it should only include low level schema changes
 
 :organization: Logilab
-:copyright: 2001-2008 LOGILAB S.A. (Paris, FRANCE), all rights reserved.
+:copyright: 2001-2009 LOGILAB S.A. (Paris, FRANCE), all rights reserved.
 :contact: http://www.logilab.fr/ -- mailto:contact@logilab.fr
 """
 
@@ -11,7 +11,7 @@
     from cubicweb.server import schemaserial
     schemaserial.HAS_FULLTEXT_CONTAINER = False
     cnx.set_shared_data('do-not-insert-is_instance_of', True)
-    add_attribute('ERType', 'fulltext_container')
+    add_attribute('CWRType', 'fulltext_container')
     schemaserial.HAS_FULLTEXT_CONTAINER = True
 
 
--- a/misc/migration/postcreate.py	Fri Apr 17 13:21:05 2009 +0200
+++ b/misc/migration/postcreate.py	Fri Apr 17 16:55:37 2009 +0200
@@ -1,22 +1,22 @@
 """cubicweb post creation script, set user's workflow"""
 
-activatedeid = add_state(_('activated'), 'EUser', initial=True)
-deactivatedeid = add_state(_('deactivated'), 'EUser')
-add_transition(_('deactivate'), 'EUser',
+activatedeid = add_state(_('activated'), 'CWUser', initial=True)
+deactivatedeid = add_state(_('deactivated'), 'CWUser')
+add_transition(_('deactivate'), 'CWUser',
                (activatedeid,), deactivatedeid,
                requiredgroups=('managers',))
-add_transition(_('activate'), 'EUser',
+add_transition(_('activate'), 'CWUser',
                (deactivatedeid,), activatedeid,
                requiredgroups=('managers',))
 
 # need this since we already have at least one user in the database (the default admin)
-rql('SET X in_state S WHERE X is EUser, S eid %s' % activatedeid)
+rql('SET X in_state S WHERE X is CWUser, S eid %s' % activatedeid)
 
 # create anonymous user if all-in-one config and anonymous user has been specified
 if hasattr(config, 'anonymous_user'):
     anonlogin, anonpwd = config.anonymous_user()
     if anonlogin:
-        rql('INSERT EUser X: X login %(login)s, X upassword %(pwd)s,'
+        rql('INSERT CWUser X: X login %(login)s, X upassword %(pwd)s,'
             'X in_state S, X in_group G WHERE G name "guests", S name "activated"',
             {'login': unicode(anonlogin), 'pwd': anonpwd})
 
@@ -30,11 +30,11 @@
         default = cfg.option_default(optname, optdict)
         # only record values differing from default
         if value != default:
-            rql('INSERT EProperty X: X pkey %(k)s, X value %(v)s', {'k': key, 'v': value})
+            rql('INSERT CWProperty X: X pkey %(k)s, X value %(v)s', {'k': key, 'v': value})
 
 # add PERM_USE_TEMPLATE_FORMAT permission
 from cubicweb.schema import PERM_USE_TEMPLATE_FORMAT
-eid = add_entity('EPermission', name=PERM_USE_TEMPLATE_FORMAT,
+eid = add_entity('CWPermission', name=PERM_USE_TEMPLATE_FORMAT,
                  label=_('use template languages'))
 rql('SET X require_group G WHERE G name "managers", X eid %(x)s',
     {'x': eid}, 'x')    
--- a/rset.py	Fri Apr 17 13:21:05 2009 +0200
+++ b/rset.py	Fri Apr 17 16:55:37 2009 +0200
@@ -368,6 +368,9 @@
             pass
         # build entity instance
         etype = self.description[row][col]
+        if etype == 'EUser':
+            import traceback
+            traceback.printstack()
         entity = self.vreg.etype_class(etype)(req, self, row, col)
         entity.set_eid(eid)
         # cache entity
--- a/schema.py	Fri Apr 17 13:21:05 2009 +0200
+++ b/schema.py	Fri Apr 17 16:55:37 2009 +0200
@@ -458,11 +458,11 @@
         
     def schema_entity_types(self):
         """return the list of entity types used to build the schema"""
-        return frozenset(('EEType', 'ERType', 'EFRDef', 'ENFRDef',
-                          'EConstraint', 'EConstraintType', 'RQLExpression',
+        return frozenset(('CWEType', 'CWRType', 'CWAttribute', 'CWRelation',
+                          'CWConstraint', 'CWConstraintType', 'RQLExpression',
                           # XXX those are not really "schema" entity types
                           #     but we usually don't want them as @* targets
-                          'EProperty', 'EPermission', 'State', 'Transition'))
+                          'CWProperty', 'CWPermission', 'State', 'Transition'))
         
     def add_entity_type(self, edef):
         edef.name = edef.name.encode()
--- a/schemas/Bookmark.py	Fri Apr 17 13:21:05 2009 +0200
+++ b/schemas/Bookmark.py	Fri Apr 17 16:55:37 2009 +0200
@@ -5,7 +5,7 @@
     path  = String(maxsize=512, required=True,
                    description=_("relative url of the bookmarked page"))
     
-    bookmarked_by = SubjectRelation('EUser',
+    bookmarked_by = SubjectRelation('CWUser',
                                     description=_("users using this bookmark"))
     
 
--- a/schemas/base.py	Fri Apr 17 13:21:05 2009 +0200
+++ b/schemas/base.py	Fri Apr 17 16:55:37 2009 +0200
@@ -9,7 +9,7 @@
 from cubicweb.schema import format_constraint
 
 
-class EUser(WorkflowableEntityType):
+class CWUser(WorkflowableEntityType):
     """define a CubicWeb user"""
     meta = True # XXX backported from old times, shouldn't be there anymore
     permissions = {
@@ -31,7 +31,7 @@
                                     description=_('email address to use for notification'))
     use_email     = SubjectRelation('EmailAddress', cardinality='*?', composite='subject')
 
-    in_group = SubjectRelation('EGroup', cardinality='+*',
+    in_group = SubjectRelation('CWGroup', cardinality='+*',
                                constraints=[RQLConstraint('NOT O name "owners"')],
                                description=_('groups grant permissions to the user'))
 
@@ -99,7 +99,7 @@
     # and to support later deletion of a user which has created some entities
     cardinality = '**'
     subject = '**'
-    object = 'EUser'
+    object = 'CWUser'
     
 class created_by(MetaRelationType):
     """core relation indicating the original creator of an entity"""
@@ -112,7 +112,7 @@
     # and to support later deletion of a user which has created some entities
     cardinality = '?*' 
     subject = '**'
-    object = 'EUser'
+    object = 'CWUser'
 
     
 class creation_date(MetaAttributeRelationType):
@@ -127,7 +127,7 @@
     subject = '**'
     object = 'Datetime'
     
-class EProperty(EntityType):
+class CWProperty(EntityType):
     """used for cubicweb configuration. Once a property has been created you
     can't change the key.
     """
@@ -145,7 +145,7 @@
                                 'value'))
     value = String(internationalizable=True, maxsize=256)
     
-    for_user = SubjectRelation('EUser', cardinality='?*', composite='object',
+    for_user = SubjectRelation('CWUser', cardinality='?*', composite='object',
                                description=_('user for which this property is '
                                              'applying. If this relation is not '
                                              'set, the property is considered as'
@@ -164,17 +164,17 @@
     inlined = True
 
 
-class EPermission(MetaEntityType):
+class CWPermission(MetaEntityType):
     """entity type that may be used to construct some advanced security configuration
     """
     name = String(required=True, indexed=True, internationalizable=True, maxsize=100,
                   description=_('name or identifier of the permission'))
     label = String(required=True, internationalizable=True, maxsize=100,
                    description=_('distinct label to distinguate between other permission entity of the same name'))
-    require_group = SubjectRelation('EGroup', 
+    require_group = SubjectRelation('CWGroup', 
                                     description=_('groups to which the permission is granted'))
 
-# explicitly add X require_permission EPermission for each entity that should have
+# explicitly add X require_permission CWPermission for each entity that should have
 # configurable security
 class require_permission(RelationType):
     """link a permission to the entity. This permission should be used in the
@@ -199,7 +199,7 @@
     """generic relation to link one entity to another"""
     symetric = True
 
-class ECache(MetaEntityType):
+class CWCache(MetaEntityType):
     """a simple cache entity characterized by a name and
     a validity date.
 
--- a/schemas/bootstrap.py	Fri Apr 17 13:21:05 2009 +0200
+++ b/schemas/bootstrap.py	Fri Apr 17 16:55:37 2009 +0200
@@ -10,7 +10,7 @@
 
 # not restricted since as "is" is handled as other relations, guests need
 # access to this
-class EEType(MetaEntityType):
+class CWEType(MetaEntityType):
     """define an entity type, used to build the application schema"""
     name = String(required=True, indexed=True, internationalizable=True,
                   unique=True, maxsize=64)
@@ -21,7 +21,7 @@
     final = Boolean(description=_('automatic'))
 
 
-class ERType(MetaEntityType):
+class CWRType(MetaEntityType):
     """define a relation type, used to build the application schema"""
     name = String(required=True, indexed=True, internationalizable=True,
                   unique=True, maxsize=64)
@@ -39,22 +39,22 @@
     final = Boolean(description=_('automatic'))
 
 
-class EFRDef(MetaEntityType):
+class CWAttribute(MetaEntityType):
     """define a final relation: link a final relation type from a non final
     entity to a final entity type. 
 
     used to build the application schema
     """
-    relation_type = SubjectRelation('ERType', cardinality='1*',
+    relation_type = SubjectRelation('CWRType', cardinality='1*',
                                     constraints=[RQLConstraint('O final TRUE')],
                                     composite='object')
-    from_entity = SubjectRelation('EEType', cardinality='1*',
+    from_entity = SubjectRelation('CWEType', cardinality='1*',
                                   constraints=[RQLConstraint('O final FALSE')],
                                   composite='object')
-    to_entity = SubjectRelation('EEType', cardinality='1*',
+    to_entity = SubjectRelation('CWEType', cardinality='1*',
                                 constraints=[RQLConstraint('O final TRUE')],
                                 composite='object')
-    constrained_by = SubjectRelation('EConstraint', cardinality='*1', composite='subject')
+    constrained_by = SubjectRelation('CWConstraint', cardinality='*1', composite='subject')
     
     cardinality = String(maxsize=2, internationalizable=True,
                          vocabulary=[_('?1'), _('11'), _('??'), _('1?')], 
@@ -77,22 +77,22 @@
                      _('?1'), _('11'), _('+1'), _('*1'),
                      _('??'), _('1?'), _('+?'), _('*?')]
 
-class ENFRDef(MetaEntityType):
+class CWRelation(MetaEntityType):
     """define a non final relation: link a non final relation type from a non
     final entity to a non final entity type. 
 
     used to build the application schema
     """
-    relation_type = SubjectRelation('ERType', cardinality='1*',
+    relation_type = SubjectRelation('CWRType', cardinality='1*',
                                     constraints=[RQLConstraint('O final FALSE')],
                                     composite='object')
-    from_entity = SubjectRelation('EEType', cardinality='1*',
+    from_entity = SubjectRelation('CWEType', cardinality='1*',
                                   constraints=[RQLConstraint('O final FALSE')],
                                   composite='object')
-    to_entity = SubjectRelation('EEType', cardinality='1*',
+    to_entity = SubjectRelation('CWEType', cardinality='1*',
                                 constraints=[RQLConstraint('O final FALSE')],
                                 composite='object')
-    constrained_by = SubjectRelation('EConstraint', cardinality='*1', composite='subject')
+    constrained_by = SubjectRelation('CWConstraint', cardinality='*1', composite='subject')
     
     cardinality = String(maxsize=2, internationalizable=True,
                          vocabulary=CARDINALITY_VOCAB,
@@ -129,41 +129,41 @@
                                       'relation\'subject, object and to '
                                       'the request user. '))
 
-    read_permission = ObjectRelation(('EEType', 'ERType'), cardinality='+?', composite='subject',
+    read_permission = ObjectRelation(('CWEType', 'CWRType'), cardinality='+?', composite='subject',
                                       description=_('rql expression allowing to read entities/relations of this type'))
-    add_permission = ObjectRelation(('EEType', 'ERType'), cardinality='*?', composite='subject',
+    add_permission = ObjectRelation(('CWEType', 'CWRType'), cardinality='*?', composite='subject',
                                      description=_('rql expression allowing to add entities/relations of this type'))
-    delete_permission = ObjectRelation(('EEType', 'ERType'), cardinality='*?', composite='subject',
+    delete_permission = ObjectRelation(('CWEType', 'CWRType'), cardinality='*?', composite='subject',
                                         description=_('rql expression allowing to delete entities/relations of this type'))
-    update_permission = ObjectRelation('EEType', cardinality='*?', composite='subject',
+    update_permission = ObjectRelation('CWEType', cardinality='*?', composite='subject',
                                         description=_('rql expression allowing to update entities of this type'))
     
 
-class EConstraint(MetaEntityType):
+class CWConstraint(MetaEntityType):
     """define a schema constraint"""
-    cstrtype = SubjectRelation('EConstraintType', cardinality='1*')
+    cstrtype = SubjectRelation('CWConstraintType', cardinality='1*')
     value = String(description=_('depends on the constraint type'))
 
 
-class EConstraintType(MetaEntityType):
+class CWConstraintType(MetaEntityType):
     """define a schema constraint type"""
     name = String(required=True, indexed=True, internationalizable=True,
                   unique=True, maxsize=64)
 
 
 # not restricted since it has to be read when checking allowed transitions
-class EGroup(MetaEntityType):
+class CWGroup(MetaEntityType):
     """define a CubicWeb users group"""
     name = String(required=True, indexed=True, internationalizable=True,
                   unique=True, maxsize=64)
 
-    read_permission = ObjectRelation(('EEType', 'ERType'), cardinality='+*',
+    read_permission = ObjectRelation(('CWEType', 'CWRType'), cardinality='+*',
                                       description=_('groups allowed to read entities/relations of this type'))
-    add_permission = ObjectRelation(('EEType', 'ERType'),
+    add_permission = ObjectRelation(('CWEType', 'CWRType'),
                                      description=_('groups allowed to add entities/relations of this type'))
-    delete_permission = ObjectRelation(('EEType', 'ERType'),
+    delete_permission = ObjectRelation(('CWEType', 'CWRType'),
                                         description=_('groups allowed to delete entities/relations of this type'))
-    update_permission = ObjectRelation('EEType',
+    update_permission = ObjectRelation('CWEType',
                                         description=_('groups allowed to update entities of this type'))
     
     
@@ -214,7 +214,7 @@
         }
     cardinality = '1*'
     subject = '**'
-    object = 'EEType'
+    object = 'CWEType'
 
 class is_instance_of(MetaRelationType):
     """core relation indicating the types (including specialized types)
@@ -229,7 +229,7 @@
         }
     cardinality = '+*'
     subject = '**'
-    object = 'EEType'
+    object = 'CWEType'
 
 class specializes(MetaRelationType):
     name = 'specializes'
@@ -239,5 +239,5 @@
         'delete': ('managers',),
         }
     cardinality = '?*'
-    subject = 'EEType'
-    object = 'EEType'
+    subject = 'CWEType'
+    object = 'CWEType'
--- a/schemas/workflow.py	Fri Apr 17 13:21:05 2009 +0200
+++ b/schemas/workflow.py	Fri Apr 17 16:55:37 2009 +0200
@@ -14,14 +14,14 @@
     description = RichString(fulltextindexed=True, default_format='text/rest',
                              description=_('semantic description of this state'))
     
-    state_of = SubjectRelation('EEType', cardinality='+*',
+    state_of = SubjectRelation('CWEType', cardinality='+*',
                     description=_('entity types which may use this state'),
                     constraints=[RQLConstraint('O final FALSE')])
     allowed_transition = SubjectRelation('Transition', cardinality='**',
                                          constraints=[RQLConstraint('S state_of ET, O transition_of ET')],
                                          description=_('allowed transitions from this state'))
     
-    initial_state = ObjectRelation('EEType', cardinality='?*',
+    initial_state = ObjectRelation('CWEType', cardinality='?*',
                                    # S initial_state O, O state_of S
                                    constraints=[RQLConstraint('O state_of S')],
                                    description=_('initial state for entities of this type'))
@@ -44,10 +44,10 @@
                                               'that will respectivly represents '
                                               'the current entity and the current user'))
     
-    require_group = SubjectRelation('EGroup', cardinality='**',
+    require_group = SubjectRelation('CWGroup', cardinality='**',
                                     description=_('group in which a user should be to be '
                                                   'allowed to pass this transition'))
-    transition_of = SubjectRelation('EEType', cardinality='+*',
+    transition_of = SubjectRelation('CWEType', cardinality='+*',
                                     description=_('entity types which may use this transition'),
                                     constraints=[RQLConstraint('O final FALSE')])
     destination_state = SubjectRelation('State', cardinality='?*',
@@ -101,7 +101,7 @@
     """indicate the current state of an entity"""
     meta = True
     # not inlined intentionnaly since when using ldap sources, user'state
-    # has to be stored outside the EUser table
+    # has to be stored outside the CWUser table
     
     # add/delete perms given to managers/users, after what most of the job
     # is done by workflow enforcment
--- a/server/__init__.py	Fri Apr 17 13:21:05 2009 +0200
+++ b/server/__init__.py	Fri Apr 17 16:55:37 2009 +0200
@@ -93,10 +93,10 @@
     print 'inserting default user and groups'
     needisfix = []
     for group in BASEGROUPS:
-        rset = session.execute('INSERT EGroup X: X name %(name)s',
+        rset = session.execute('INSERT CWGroup X: X name %(name)s',
                                {'name': unicode(group)})
         needisfix.append( (rset.rows[0][0], rset.description[0][0]) )
-    rset = session.execute('INSERT EUser X: X login %(login)s, X upassword %(pwd)s',
+    rset = session.execute('INSERT CWUser X: X login %(login)s, X upassword %(pwd)s',
                            {'login': login, 'pwd': pwd})
     needisfix.append( (rset.rows[0][0], rset.description[0][0]) )
     session.execute('SET U in_group G WHERE G name "managers"')
@@ -116,10 +116,10 @@
         handler.session.unsafe_execute('SET X is_instance_of E WHERE X eid %(x)s, E name %(name)s',
                                        {'x': eid, 'name': etype}, 'x')
     # insert versions
-    handler.cmd_add_entity('EProperty', pkey=u'system.version.cubicweb',
+    handler.cmd_add_entity('CWProperty', pkey=u'system.version.cubicweb',
                            value=unicode(config.cubicweb_version()))
     for cube in config.cubes():
-        handler.cmd_add_entity('EProperty', 
+        handler.cmd_add_entity('CWProperty', 
                                pkey=u'system.version.%s' % cube.lower(),
                                value=unicode(config.cube_version(cube)))
     # yoo !
--- a/server/checkintegrity.py	Fri Apr 17 13:21:05 2009 +0200
+++ b/server/checkintegrity.py	Fri Apr 17 16:55:37 2009 +0200
@@ -111,7 +111,7 @@
                           'VocabularyConstraint', 'RQLConstraint',
                           'RQLVocabularyConstraint')
     rql = ('Any COUNT(X),RN,EN,ECTN GROUPBY RN,EN,ECTN ORDERBY 1 '
-           'WHERE X is EConstraint, R constrained_by X, '
+           'WHERE X is CWConstraint, R constrained_by X, '
            'R relation_type RT, R from_entity ET, RT name RN, '
            'ET name EN, X cstrtype ECT, ECT name ECTN')
     for count, rn, en, cstrname in session.execute(rql):
@@ -252,7 +252,7 @@
                     print >> sys.stderr, ' [FIXED]'
                 else:
                     print >> sys.stderr
-    cursor = session.system_sql('SELECT MIN(%s) FROM %sEUser;' % (eidcolumn,
+    cursor = session.system_sql('SELECT MIN(%s) FROM %sCWUser;' % (eidcolumn,
                                                                   SQL_PREFIX))
     default_user_eid = cursor.fetchone()[0]
     assert default_user_eid is not None, 'no user defined !'
--- a/server/hooks.py	Fri Apr 17 13:21:05 2009 +0200
+++ b/server/hooks.py	Fri Apr 17 16:55:37 2009 +0200
@@ -125,8 +125,8 @@
     hm.register_hook(fti_update_after_delete_relation, 'after_delete_relation', '')
     if 'is' in hm.schema:
         hm.register_hook(setis_after_add_entity, 'after_add_entity', '')
-    if 'EUser' in hm.schema:
-        hm.register_hook(setowner_after_add_user, 'after_add_entity', 'EUser')
+    if 'CWUser' in hm.schema:
+        hm.register_hook(setowner_after_add_user, 'after_add_entity', 'CWUser')
             
 # core hooks ##################################################################
     
@@ -282,7 +282,7 @@
 
 def _register_core_hooks(hm):
     hm.register_hook(handle_composite_before_del_relation, 'before_delete_relation', '')
-    hm.register_hook(before_del_group, 'before_delete_entity', 'EGroup')
+    hm.register_hook(before_del_group, 'before_delete_entity', 'CWGroup')
     
     #hm.register_hook(cstrcheck_before_update_entity, 'before_update_entity', '')
     hm.register_hook(cardinalitycheck_after_add_entity, 'after_add_entity', '')
@@ -362,7 +362,7 @@
     
 def _register_usergroup_hooks(hm):
     """register user/group related hooks on the hooks manager"""
-    hm.register_hook(after_del_user, 'after_delete_entity', 'EUser')
+    hm.register_hook(after_del_user, 'after_delete_entity', 'CWUser')
     hm.register_hook(after_add_in_group, 'after_add_relation', 'in_group')
     hm.register_hook(after_del_in_group, 'after_delete_relation', 'in_group')
 
@@ -442,10 +442,10 @@
                                  str(eschema))
 
 
-# EProperty hooks #############################################################
+# CWProperty hooks #############################################################
 
 
-class DelEPropertyOp(Operation):
+class DelCWPropertyOp(Operation):
     """a user's custom properties has been deleted"""
     
     def commit_event(self):
@@ -455,14 +455,14 @@
         except KeyError:
             self.error('%s has no associated value', self.key)
 
-class ChangeEPropertyOp(Operation):
+class ChangeCWPropertyOp(Operation):
     """a user's custom properties has been added/changed"""
         
     def commit_event(self):
         """the observed connections pool has been commited"""
         self.epropdict[self.key] = self.value
 
-class AddEPropertyOp(Operation):
+class AddCWPropertyOp(Operation):
     """a user's custom properties has been added/changed"""
         
     def commit_event(self):
@@ -470,7 +470,7 @@
         eprop = self.eprop
         if not eprop.for_user:
             self.repo.vreg.eprop_values[eprop.pkey] = eprop.value
-        # if for_user is set, update is handled by a ChangeEPropertyOp operation
+        # if for_user is set, update is handled by a ChangeCWPropertyOp operation
 
 def after_add_eproperty(session, entity):
     key, value = entity.pkey, entity.value
@@ -484,7 +484,7 @@
         session.unsafe_execute('SET P for_user U WHERE P eid %(x)s,U eid %(u)s',
                                {'x': entity.eid, 'u': session.user.eid}, 'x')
     else:
-        AddEPropertyOp(session, eprop=entity)
+        AddCWPropertyOp(session, eprop=entity)
         
 def after_update_eproperty(session, entity):
     key, value = entity.pkey, entity.value
@@ -496,11 +496,11 @@
         raise ValidationError(entity.eid, {'value': session._(str(ex))})
     if entity.for_user:
         for session_ in get_user_sessions(session.repo, entity.for_user[0].eid):
-            ChangeEPropertyOp(session, epropdict=session_.user.properties,
+            ChangeCWPropertyOp(session, epropdict=session_.user.properties,
                               key=key, value=value)
     else:
         # site wide properties
-        ChangeEPropertyOp(session, epropdict=session.vreg.eprop_values,
+        ChangeCWPropertyOp(session, epropdict=session.vreg.eprop_values,
                           key=key, value=value)
         
 def before_del_eproperty(session, eid):
@@ -511,10 +511,10 @@
     else:
         key = session.execute('Any K WHERE P eid %(x)s, P pkey K',
                               {'x': eid}, 'x')[0][0]
-        DelEPropertyOp(session, epropdict=session.vreg.eprop_values, key=key)
+        DelCWPropertyOp(session, epropdict=session.vreg.eprop_values, key=key)
 
 def after_add_for_user(session, fromeid, rtype, toeid):
-    if not session.describe(fromeid)[0] == 'EProperty':
+    if not session.describe(fromeid)[0] == 'CWProperty':
         return
     key, value = session.execute('Any K,V WHERE P eid %(x)s,P pkey K,P value V',
                                  {'x': fromeid}, 'x')[0]
@@ -522,7 +522,7 @@
         raise ValidationError(fromeid,
                               {'for_user': session._("site-wide property can't be set for user")})
     for session_ in get_user_sessions(session.repo, toeid):
-        ChangeEPropertyOp(session, epropdict=session_.user.properties,
+        ChangeCWPropertyOp(session, epropdict=session_.user.properties,
                           key=key, value=value)
         
 def before_del_for_user(session, fromeid, rtype, toeid):
@@ -530,12 +530,12 @@
                           {'x': fromeid}, 'x')[0][0]
     relation_deleted(session, fromeid, rtype, toeid)
     for session_ in get_user_sessions(session.repo, toeid):
-        DelEPropertyOp(session, epropdict=session_.user.properties, key=key)
+        DelCWPropertyOp(session, epropdict=session_.user.properties, key=key)
 
 def _register_eproperty_hooks(hm):
     """register workflow related hooks on the hooks manager"""
-    hm.register_hook(after_add_eproperty, 'after_add_entity', 'EProperty')
-    hm.register_hook(after_update_eproperty, 'after_update_entity', 'EProperty')
-    hm.register_hook(before_del_eproperty, 'before_delete_entity', 'EProperty')
+    hm.register_hook(after_add_eproperty, 'after_add_entity', 'CWProperty')
+    hm.register_hook(after_update_eproperty, 'after_update_entity', 'CWProperty')
+    hm.register_hook(before_del_eproperty, 'before_delete_entity', 'CWProperty')
     hm.register_hook(after_add_for_user, 'after_add_relation', 'for_user')
     hm.register_hook(before_del_for_user, 'before_delete_relation', 'for_user')
--- a/server/migractions.py	Fri Apr 17 13:21:05 2009 +0200
+++ b/server/migractions.py	Fri Apr 17 16:55:37 2009 +0200
@@ -27,7 +27,7 @@
 from yams.constraints import SizeConstraint
 from yams.schema2sql import eschema2sql, rschema2sql
 
-from cubicweb import AuthenticationError
+from cubicweb import AuthenticationError, ETYPE_NAME_MAP
 from cubicweb.dbapi import get_repository, repo_connect
 from cubicweb.common.migration import MigrationHelper, yes
 
@@ -38,42 +38,6 @@
 except ImportError: # LAX
     pass
 
-def set_sql_prefix(prefix):
-    """3.1.5 migration function: allow to unset/reset SQL_PREFIX"""
-    for module in ('checkintegrity', 'migractions', 'schemahooks',
-                   'sources.rql2sql', 'sources.native'):
-        try:
-            sys.modules['cubicweb.server.%s' % module].SQL_PREFIX = prefix
-            print 'changed SQL_PREFIX for %s' % module
-        except KeyError:
-            pass
-        
-def update_database(repo):
-    """3.1.3 migration function: update database schema by adding SQL_PREFIX to
-    entity type tables and columns
-    """
-    pool = repo._get_pool()
-    source = repo.system_source
-    sqlcu = pool['system']
-    for etype in repo.schema.entities():
-        if etype.is_final():
-            continue
-        try:
-            sqlcu.execute('ALTER TABLE %s RENAME TO cw_%s' % (etype, etype))
-            print 'renamed %s table for source %s' % (etype, uri)
-        except:
-            pass
-        for rschema in etype.subject_relations():
-            if rschema == 'has_text':
-                continue
-            if rschema.is_final() or rschema.inlined:
-                sqlcu.execute('ALTER TABLE cw_%s RENAME %s TO cw_%s'
-                              % (etype, rschema, rschema))
-                print 'renamed %s.%s column for source %s' % (
-                    etype, rschema, uri)
-    pool.commit()
-    repo._free_pool(pool)
-
         
 class ServerMigrationHelper(MigrationHelper):
     """specific migration helper for server side  migration scripts,
@@ -99,17 +63,7 @@
 
     @cached
     def repo_connect(self):
-        try:
-            self.repo = get_repository(method='inmemory', config=self.config)
-        except:
-            import traceback
-            traceback.print_exc()
-            print '3.1.5 migration'
-            # XXX 3.1.5 migration
-            set_sql_prefix('')
-            self.repo = get_repository(method='inmemory', config=self.config)
-            update_database(self.repo)
-            set_sql_prefix('cw_')
+        self.repo = get_repository(method='inmemory', config=self.config)
         return self.repo
     
     def shutdown(self):
@@ -394,7 +348,7 @@
         # execute post-remove files
         for pack in reversed(removedcubes):
             self.exec_event_script('postremove', self.config.cube_dir(pack))
-            self.rqlexec('DELETE EProperty X WHERE X pkey %(pk)s',
+            self.rqlexec('DELETE CWProperty X WHERE X pkey %(pk)s',
                          {'pk': u'system.version.'+pack}, ask_confirm=False)
             self.commit()
             
@@ -449,7 +403,7 @@
         else:
             eschema = self.fs_schema.eschema(etype)
         confirm = self.verbosity >= 2
-        # register the entity into EEType
+        # register the entity into CWEType
         self.rqlexecall(ss.eschema2rql(eschema), ask_confirm=confirm)
         # add specializes relation if needed
         self.rqlexecall(ss.eschemaspecialize2rql(eschema), ask_confirm=confirm)
@@ -525,8 +479,8 @@
         This will trigger deletion of necessary relation types and definitions
         """
         # XXX what if we delete an entity type which is specialized by other types
-        # unregister the entity from EEType
-        self.rqlexec('DELETE EEType X WHERE X name %(etype)s', {'etype': etype},
+        # unregister the entity from CWEType
+        self.rqlexec('DELETE CWEType X WHERE X name %(etype)s', {'etype': etype},
                      ask_confirm=self.verbosity>=2)
         if commit:
             self.commit()
@@ -537,7 +491,7 @@
         `oldname` is a string giving the name of the existing entity type
         `newname` is a string giving the name of the renamed entity type
         """
-        self.rqlexec('SET ET name %(newname)s WHERE ET is EEType, ET name %(oldname)s',
+        self.rqlexec('SET ET name %(newname)s WHERE ET is CWEType, ET name %(oldname)s',
                      {'newname' : unicode(newname), 'oldname' : oldname})
         if commit:
             self.commit()
@@ -554,7 +508,7 @@
         
         """
         rschema = self.fs_schema.rschema(rtype)
-        # register the relation into ERType and insert necessary relation
+        # register the relation into CWRType and insert necessary relation
         # definitions
         self.rqlexecall(ss.rschema2rql(rschema, addrdef=False),
                         ask_confirm=self.verbosity>=2)
@@ -570,8 +524,8 @@
         
     def cmd_drop_relation_type(self, rtype, commit=True):
         """unregister an existing relation type"""
-        # unregister the relation from ERType
-        self.rqlexec('DELETE ERType X WHERE X name %r' % rtype,
+        # unregister the relation from CWRType
+        self.rqlexec('DELETE CWRType X WHERE X name %r' % rtype,
                      ask_confirm=self.verbosity>=2)
         if commit:
             self.commit()
@@ -602,11 +556,11 @@
     def cmd_drop_relation_definition(self, subjtype, rtype, objtype, commit=True):
         """unregister an existing relation definition"""
         rschema = self.repo.schema.rschema(rtype)
-        # unregister the definition from EFRDef or ENFRDef
+        # unregister the definition from CWAttribute or CWRelation
         if rschema.is_final():
-            etype = 'EFRDef'
+            etype = 'CWAttribute'
         else:
-            etype = 'ENFRDef'
+            etype = 'CWRelation'
         rql = ('DELETE %s X WHERE X from_entity FE, FE name "%s",'
                'X relation_type RT, RT name "%s", X to_entity TE, TE name "%s"')
         self.rqlexec(rql % (etype, subjtype, rtype, objtype),
@@ -734,11 +688,11 @@
         repospschema = repoeschema.specializes()
         espschema = eschema.specializes()
         if repospschema and not espschema:
-            self.rqlexec('DELETE X specializes Y WHERE X is EEType, X name %(x)s',
+            self.rqlexec('DELETE X specializes Y WHERE X is CWEType, X name %(x)s',
                          {'x': str(repoeschema)})
         elif not repospschema and espschema:
-            self.rqlexec('SET X specializes Y WHERE X is EEType, X name %(x)s, '
-                         'Y is EEType, Y name %(y)s',
+            self.rqlexec('SET X specializes Y WHERE X is CWEType, X name %(x)s, '
+                         'Y is CWEType, Y name %(y)s',
                          {'x': str(repoeschema), 'y': str(espschema)})
         self.rqlexecall(ss.updateeschema2rql(eschema),
                         ask_confirm=self.verbosity >= 2)
@@ -800,7 +754,7 @@
                 self.rqlexec('DELETE X constrained_by C WHERE C eid %(x)s',
                              {'x': cstr.eid}, 'x',
                              ask_confirm=confirm)
-                self.rqlexec('DELETE EConstraint C WHERE C eid %(x)s',
+                self.rqlexec('DELETE CWConstraint C WHERE C eid %(x)s',
                              {'x': cstr.eid}, 'x',
                              ask_confirm=confirm)
             else:
@@ -863,7 +817,7 @@
         if oldvalue == size:
             return
         if oldvalue is None and not size is None:
-            ceid = self.rqlexec('INSERT EConstraint C: C value %(v)s, C cstrtype CT '
+            ceid = self.rqlexec('INSERT CWConstraint C: C value %(v)s, C cstrtype CT '
                                 'WHERE CT name "SizeConstraint"',
                                 {'v': SizeConstraint(size).serialize()},
                                 ask_confirm=self.verbosity>=2)[0][0]
@@ -883,7 +837,7 @@
                              'S name "%s", R name "%s"' % (etype, rtype),
                              ask_confirm=self.verbosity>=2)
                 # cleanup unused constraints
-                self.rqlexec('DELETE EConstraint C WHERE NOT X constrained_by C')
+                self.rqlexec('DELETE CWConstraint C WHERE NOT X constrained_by C')
         if commit:
             self.commit()
     
@@ -964,20 +918,20 @@
         if commit:
             self.commit()
         
-    # EProperty handling ######################################################
+    # CWProperty handling ######################################################
 
     def cmd_property_value(self, pkey):
-        rql = 'Any V WHERE X is EProperty, X pkey %(k)s, X value V'
+        rql = 'Any V WHERE X is CWProperty, X pkey %(k)s, X value V'
         rset = self.rqlexec(rql, {'k': pkey}, ask_confirm=False)
         return rset[0][0]
 
     def cmd_set_property(self, pkey, value):
         value = unicode(value)
         try:
-            prop = self.rqlexec('EProperty X WHERE X pkey %(k)s', {'k': pkey},
+            prop = self.rqlexec('CWProperty X WHERE X pkey %(k)s', {'k': pkey},
                                 ask_confirm=False).get_entity(0, 0)
         except:
-            self.cmd_add_entity('EProperty', pkey=unicode(pkey), value=value)
+            self.cmd_add_entity('CWProperty', pkey=unicode(pkey), value=value)
         else:
             self.rqlexec('SET X value %(v)s WHERE X pkey %(k)s',
                          {'k': pkey, 'v': value}, ask_confirm=False)
@@ -1064,8 +1018,8 @@
         rschema = self.repo.schema.rschema(attr)
         oldtype = rschema.objects(etype)[0]
         rdefeid = rschema.rproperty(etype, oldtype, 'eid')
-        sql = ("UPDATE EFRDef "
-               "SET to_entity=(SELECT eid FROM EEType WHERE name='%s')"
+        sql = ("UPDATE CWAttribute "
+               "SET to_entity=(SELECT eid FROM CWEType WHERE name='%s')"
                "WHERE eid=%s") % (newtype, rdefeid)
         self.sqlexec(sql, ask_confirm=False)
         dbhelper = self.repo.system_source.dbhelper
--- a/server/msplanner.py	Fri Apr 17 13:21:05 2009 +0200
+++ b/server/msplanner.py	Fri Apr 17 16:55:37 2009 +0200
@@ -33,25 +33,25 @@
 
 Exemples of multi-sources query execution
 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
-For a system source and a ldap user source (only EUser and its attributes
+For a system source and a ldap user source (only CWUser and its attributes
 is supported, no group or such):
 
-:EUser X:
-1. fetch EUser X from both sources and return concatenation of results
+:CWUser X:
+1. fetch CWUser X from both sources and return concatenation of results
 
-:EUser X WHERE X in_group G, G name 'users':
+:CWUser X WHERE X in_group G, G name 'users':
 * catch 1
-  1. fetch EUser X from both sources, store concatenation of results into a
+  1. fetch CWUser X from both sources, store concatenation of results into a
      temporary table
   2. return the result of TMP X WHERE X in_group G, G name 'users' from the
      system source
 * catch 2
-  1. return the result of EUser X WHERE X in_group G, G name 'users' from system
+  1. return the result of CWUser X WHERE X in_group G, G name 'users' from system
      source, that's enough (optimization of the sql querier will avoid join on
-     EUser, so we will directly get local eids)
+     CWUser, so we will directly get local eids)
     
-:EUser X,L WHERE X in_group G, X login L, G name 'users':
-1. fetch Any X,L WHERE X is EUser, X login L from both sources, store
+:CWUser X,L WHERE X in_group G, X login L, G name 'users':
+1. fetch Any X,L WHERE X is CWUser, X login L from both sources, store
    concatenation of results into a temporary table
 2. return the result of Any X, L WHERE X is TMP, X login LX in_group G,
    G name 'users' from the system source
@@ -59,13 +59,13 @@
 
 :Any X WHERE X owned_by Y:
 * catch 1
-  1. fetch EUser X from both sources, store concatenation of results into a
+  1. fetch CWUser X from both sources, store concatenation of results into a
      temporary table
   2. return the result of Any X WHERE X owned_by Y, Y is TMP from the system
      source
 * catch 2
   1. return the result of Any X WHERE X owned_by Y from system source, that's
-     enough (optimization of the sql querier will avoid join on EUser, so we
+     enough (optimization of the sql querier will avoid join on CWUser, so we
      will directly get local eids)
 
 
--- a/server/repository.py	Fri Apr 17 13:21:05 2009 +0200
+++ b/server/repository.py	Fri Apr 17 16:55:37 2009 +0200
@@ -180,7 +180,7 @@
             self.warning("set fs application'schema as bootstrap schema")
             config.bootstrap_cubes()
             self.set_bootstrap_schema(self.config.load_schema())
-            # need to load the Any and EUser entity types
+            # need to load the Any and CWUser entity types
             self.vreg.schema = self.schema
             etdirectory = join(CW_SOFTWARE_ROOT, 'entities')
             self.vreg.init_registration([etdirectory])
@@ -194,7 +194,7 @@
             config.bootstrap_cubes()
             self.set_schema(self.config.load_schema())
         if not config.creating:
-            if 'EProperty' in self.schema:
+            if 'CWProperty' in self.schema:
                 self.vreg.init_properties(self.properties())
             # call source's init method to complete their initialisation if
             # needed (for instance looking for persistent configuration using an
@@ -257,11 +257,13 @@
             except BadSchemaDefinition:
                 raise
             except Exception, ex:
+                import traceback
+                traceback.print_exc()
                 raise Exception('Is the database initialised ? (cause: %s)' % 
                                 (ex.args and ex.args[0].strip() or 'unknown')), \
                                 None, sys.exc_info()[-1]
             self.info('set the actual schema')
-            # XXX have to do this since EProperty isn't in the bootstrap schema
+            # XXX have to do this since CWProperty isn't in the bootstrap schema
             #     it'll be redone in set_schema
             self.set_bootstrap_schema(appschema)
             # 2.49 migration
@@ -269,7 +271,7 @@
                 session.set_pool()
                 if not 'template' in file(join(self.config.apphome, 'vc.conf')).read():
                     # remaning from cubicweb < 2.38...
-                    session.execute('DELETE EProperty X WHERE X pkey "system.version.template"')
+                    session.execute('DELETE CWProperty X WHERE X pkey "system.version.template"')
                     session.commit()
         finally:
             session.close()
@@ -383,10 +385,10 @@
         
     def authenticate_user(self, session, login, password):
         """validate login / password, raise AuthenticationError on failure
-        return associated EUser instance on success
+        return associated CWUser instance on success
         """
         for source in self.sources:
-            if source.support_entity('EUser'):
+            if source.support_entity('CWUser'):
                 try:
                     eid = source.authenticate(session, login, password)
                     break
@@ -401,8 +403,8 @@
         return euser
 
     def _build_user(self, session, eid):
-        """return a EUser entity for user with the given eid"""
-        cls = self.vreg.etype_class('EUser')
+        """return a CWUser entity for user with the given eid"""
+        cls = self.vreg.etype_class('CWUser')
         rql = cls.fetch_rql(session.user, ['X eid %(x)s'])
         rset = session.execute(rql, {'x': eid}, 'x')
         assert len(rset) == 1, rset
@@ -447,7 +449,7 @@
         session = self.internal_session()
         try:
             for pk, version in session.execute(
-                'Any K,V WHERE P is EProperty, P value V, P pkey K, '
+                'Any K,V WHERE P is CWProperty, P value V, P pkey K, '
                 'P pkey ~="system.version.%"', build_descr=False):
                 cube = pk.split('.')[-1]
                 # XXX cubicweb migration
@@ -484,7 +486,7 @@
         """return a result set containing system wide properties"""
         session = self.internal_session()
         try:
-            return session.execute('Any K,V WHERE P is EProperty,'
+            return session.execute('Any K,V WHERE P is CWProperty,'
                                    'P pkey K, P value V, NOT P for_user U',
                                    build_descr=False)
         finally:
@@ -499,12 +501,12 @@
         # for consistency, keep same error as unique check hook (although not required)
         errmsg = session._('the value "%s" is already used, use another one')
         try:
-            if (session.execute('EUser X WHERE X login %(login)s', {'login': login})
-                or session.execute('EUser X WHERE X use_email C, C address %(login)s',
+            if (session.execute('CWUser X WHERE X login %(login)s', {'login': login})
+                or session.execute('CWUser X WHERE X use_email C, C address %(login)s',
                                    {'login': login})):
                 raise ValidationError(None, {'login': errmsg % login})
             # we have to create the user
-            user = self.vreg.etype_class('EUser')(session, None)
+            user = self.vreg.etype_class('CWUser')(session, None)
             if isinstance(password, unicode):
                 # password should *always* be utf8 encoded
                 password = password.encode('UTF8')
--- a/server/schemahooks.py	Fri Apr 17 13:21:05 2009 +0200
+++ b/server/schemahooks.py	Fri Apr 17 16:55:37 2009 +0200
@@ -23,8 +23,8 @@
                                      check_internal_entity)
     
 # core entity and relation types which can't be removed
-CORE_ETYPES = list(BASE_TYPES) + ['EEType', 'ERType', 'EUser', 'EGroup',
-                                  'EConstraint', 'EFRDef', 'ENFRDef']
+CORE_ETYPES = list(BASE_TYPES) + ['CWEType', 'CWRType', 'CWUser', 'CWGroup',
+                                  'CWConstraint', 'CWAttribute', 'CWRelation']
 CORE_RTYPES = ['eid', 'creation_date', 'modification_date',
                'login', 'upassword', 'name',
                'is', 'instanceof', 'owned_by', 'created_by', 'in_group',
@@ -134,7 +134,7 @@
 
 # deletion ####################################################################
 
-class DeleteEETypeOp(SchemaOperation):
+class DeleteCWETypeOp(SchemaOperation):
     """actually remove the entity type from the application's schema"""    
     def commit_event(self):
         try:
@@ -145,9 +145,9 @@
             pass
 
 def before_del_eetype(session, eid):
-    """before deleting a EEType entity:
+    """before deleting a CWEType entity:
     * check that we don't remove a core entity type
-    * cascade to delete related EFRDef and ENFRDef entities
+    * cascade to delete related CWAttribute and CWRelation entities
     * instantiate an operation to delete the entity type on commit
     """
     # final entities can't be deleted, don't care about that
@@ -155,7 +155,7 @@
     # delete every entities of this type
     session.unsafe_execute('DELETE %s X' % name)
     DropTableOp(session, table=SQL_PREFIX + name)
-    DeleteEETypeOp(session, name)
+    DeleteCWETypeOp(session, name)
 
 def after_del_eetype(session, eid):
     # workflow cleanup
@@ -163,7 +163,7 @@
     session.execute('DELETE Transition X WHERE NOT X transition_of Y')
 
         
-class DeleteERTypeOp(SchemaOperation):
+class DeleteCWRTypeOp(SchemaOperation):
     """actually remove the relation type from the application's schema"""    
     def commit_event(self):
         try:
@@ -173,18 +173,18 @@
             pass
 
 def before_del_ertype(session, eid):
-    """before deleting a ERType entity:
+    """before deleting a CWRType entity:
     * check that we don't remove a core relation type
-    * cascade to delete related EFRDef and ENFRDef entities
+    * cascade to delete related CWAttribute and CWRelation entities
     * instantiate an operation to delete the relation type on commit
     """
     name = check_internal_entity(session, eid, CORE_RTYPES)
     # delete relation definitions using this relation type
-    session.execute('DELETE EFRDef X WHERE X relation_type Y, Y eid %(x)s',
+    session.execute('DELETE CWAttribute X WHERE X relation_type Y, Y eid %(x)s',
                     {'x': eid})
-    session.execute('DELETE ENFRDef X WHERE X relation_type Y, Y eid %(x)s',
+    session.execute('DELETE CWRelation X WHERE X relation_type Y, Y eid %(x)s',
                     {'x': eid})
-    DeleteERTypeOp(session, name)
+    DeleteCWRTypeOp(session, name)
 
     
 class DelErdefOp(SchemaOperation):
@@ -198,7 +198,7 @@
             pass
         
 def after_del_relation_type(session, rdefeid, rtype, rteid):
-    """before deleting a EFRDef or ENFRDef entity:
+    """before deleting a CWAttribute or CWRelation entity:
     * if this is a final or inlined relation definition, instantiate an
       operation to drop necessary column, else if this is the last instance
       of a non final relation, instantiate an operation to drop necessary
@@ -210,9 +210,9 @@
     pendings = session.query_data('pendingeids', ())
     # first delete existing relation if necessary
     if rschema.is_final():
-        rdeftype = 'EFRDef'
+        rdeftype = 'CWAttribute'
     else:
-        rdeftype = 'ENFRDef'
+        rdeftype = 'CWRelation'
         if not (subjschema.eid in pendings or objschema.eid in pendings):
             session.execute('DELETE X %s Y WHERE X is %s, Y is %s'
                             % (rschema, subjschema, objschema))
@@ -235,13 +235,13 @@
         DropTableOp(session, table='%s_relation' % rschema.type)
     # if this is the last instance, drop associated relation type
     if lastrel and not rteid in pendings:
-        execute('DELETE ERType X WHERE X eid %(x)s', {'x': rteid}, 'x')
+        execute('DELETE CWRType X WHERE X eid %(x)s', {'x': rteid}, 'x')
     DelErdefOp(session, (subjschema, rschema, objschema))
 
         
 # addition ####################################################################
 
-class AddEETypeOp(EarlySchemaOperation):
+class AddCWETypeOp(EarlySchemaOperation):
     """actually add the entity type to the application's schema"""    
     eid = None # make pylint happy
     def commit_event(self):
@@ -249,7 +249,7 @@
         eschema.eid = self.eid
         
 def before_add_eetype(session, entity):
-    """before adding a EEType entity:
+    """before adding a CWEType entity:
     * check that we are not using an existing entity type,
     """
     name = entity['name']
@@ -258,11 +258,11 @@
         raise RepositoryError('an entity type %s already exists' % name)
 
 def after_add_eetype(session, entity):
-    """after adding a EEType entity:
+    """after adding a CWEType entity:
     * create the necessary table
     * set creation_date and modification_date by creating the necessary
-      EFRDef entities
-    * add owned_by relation by creating the necessary ENFRDef entity
+      CWAttribute entities
+    * add owned_by relation by creating the necessary CWRelation entity
     * register an operation to add the entity type to the application's
       schema on commit
     """
@@ -297,13 +297,13 @@
     # register operation to modify the schema on commit
     # this have to be done before adding other relations definitions
     # or permission settings
-    AddEETypeOp(session, etype, eid=entity.eid)
+    AddCWETypeOp(session, etype, eid=entity.eid)
     # add meta creation_date, modification_date and owned_by relations
     for rql, kwargs in relrqls:
         session.execute(rql, kwargs)
 
 
-class AddERTypeOp(EarlySchemaOperation):
+class AddCWRTypeOp(EarlySchemaOperation):
     """actually add the relation type to the application's schema"""    
     eid = None # make pylint happy
     def commit_event(self):
@@ -312,7 +312,7 @@
         rschema.eid = self.eid
         
 def before_add_ertype(session, entity):
-    """before adding a ERType entity:
+    """before adding a CWRType entity:
     * check that we are not using an existing relation type,
     * register an operation to add the relation type to the application's
       schema on commit
@@ -324,12 +324,12 @@
         raise RepositoryError('a relation type %s already exists' % name)
     
 def after_add_ertype(session, entity):
-    """after a ERType entity has been added:
+    """after a CWRType entity has been added:
     * register an operation to add the relation type to the application's
       schema on commit
     We don't know yeat this point if a table is necessary
     """
-    AddERTypeOp(session, RelationType(name=entity['name'],
+    AddCWRTypeOp(session, RelationType(name=entity['name'],
                                       description=entity.get('description'),
                                       meta=entity.get('meta', False),
                                       inlined=entity.get('inlined', False),
@@ -356,8 +356,8 @@
     }
 
 
-class AddEFRDefPreCommitOp(PreCommitOperation):
-    """an attribute relation (EFRDef) has been added:
+class AddCWAttributePreCommitOp(PreCommitOperation):
+    """an attribute relation (CWAttribute) has been added:
     * add the necessary column
     * set default on this column if any and possible
     * register an operation to add the relation definition to the
@@ -439,10 +439,10 @@
         AddErdefOp(session, rdef)
 
 def after_add_efrdef(session, entity):
-    AddEFRDefPreCommitOp(session, entity=entity)
+    AddCWAttributePreCommitOp(session, entity=entity)
 
 
-class AddENFRDefPreCommitOp(PreCommitOperation):
+class AddCWRelationPreCommitOp(PreCommitOperation):
     """an actual relation has been added:
     * if this is an inlined relation, add the necessary column
       else if it's the first instance of this relation type, add the
@@ -510,7 +510,7 @@
                 session.add_query_data('createdtables', rtype)
                 
 def after_add_enfrdef(session, entity):
-    AddENFRDefPreCommitOp(session, entity=entity)
+    AddCWRelationPreCommitOp(session, entity=entity)
 
 
 # update ######################################################################
@@ -846,7 +846,7 @@
 def after_add_permission(session, subject, rtype, object):
     """added entity/relation *_permission, need to update schema"""
     perm = rtype.split('_', 1)[0]
-    if session.describe(object)[0] == 'EGroup':
+    if session.describe(object)[0] == 'CWGroup':
         AddGroupPermissionOp(session, perm, subject, object)
     else: # RQLExpression
         expr = session.execute('Any EXPR WHERE X eid %(x)s, X expression EXPR',
@@ -906,7 +906,7 @@
     if subject in session.query_data('pendingeids', ()):
         return
     perm = rtype.split('_', 1)[0]
-    if session.describe(object)[0] == 'EGroup':
+    if session.describe(object)[0] == 'CWGroup':
         DelGroupPermissionOp(session, perm, subject, object)
     else: # RQLExpression
         expr = session.execute('Any EXPR WHERE X eid %(x)s, X expression EXPR',
@@ -925,28 +925,28 @@
     """register schema related hooks on the hooks manager"""
     # schema synchronisation #####################
     # before/after add
-    hm.register_hook(before_add_eetype, 'before_add_entity', 'EEType')
-    hm.register_hook(before_add_ertype, 'before_add_entity', 'ERType')
-    hm.register_hook(after_add_eetype, 'after_add_entity', 'EEType')
-    hm.register_hook(after_add_ertype, 'after_add_entity', 'ERType')
-    hm.register_hook(after_add_efrdef, 'after_add_entity', 'EFRDef')
-    hm.register_hook(after_add_enfrdef, 'after_add_entity', 'ENFRDef')
+    hm.register_hook(before_add_eetype, 'before_add_entity', 'CWEType')
+    hm.register_hook(before_add_ertype, 'before_add_entity', 'CWRType')
+    hm.register_hook(after_add_eetype, 'after_add_entity', 'CWEType')
+    hm.register_hook(after_add_ertype, 'after_add_entity', 'CWRType')
+    hm.register_hook(after_add_efrdef, 'after_add_entity', 'CWAttribute')
+    hm.register_hook(after_add_enfrdef, 'after_add_entity', 'CWRelation')
     # before/after update
-    hm.register_hook(before_update_eetype, 'before_update_entity', 'EEType')
-    hm.register_hook(before_update_ertype, 'before_update_entity', 'ERType')
-    hm.register_hook(after_update_ertype, 'after_update_entity', 'ERType')
-    hm.register_hook(after_update_erdef, 'after_update_entity', 'EFRDef')
-    hm.register_hook(after_update_erdef, 'after_update_entity', 'ENFRDef')
+    hm.register_hook(before_update_eetype, 'before_update_entity', 'CWEType')
+    hm.register_hook(before_update_ertype, 'before_update_entity', 'CWRType')
+    hm.register_hook(after_update_ertype, 'after_update_entity', 'CWRType')
+    hm.register_hook(after_update_erdef, 'after_update_entity', 'CWAttribute')
+    hm.register_hook(after_update_erdef, 'after_update_entity', 'CWRelation')
     # before/after delete
-    hm.register_hook(before_del_eetype, 'before_delete_entity', 'EEType')
-    hm.register_hook(after_del_eetype, 'after_delete_entity', 'EEType')
-    hm.register_hook(before_del_ertype, 'before_delete_entity', 'ERType')
+    hm.register_hook(before_del_eetype, 'before_delete_entity', 'CWEType')
+    hm.register_hook(after_del_eetype, 'after_delete_entity', 'CWEType')
+    hm.register_hook(before_del_ertype, 'before_delete_entity', 'CWRType')
     hm.register_hook(after_del_relation_type, 'after_delete_relation', 'relation_type')
     hm.register_hook(rebuild_infered_relations, 'after_add_relation', 'specializes')
     hm.register_hook(rebuild_infered_relations, 'after_delete_relation', 'specializes')    
     # constraints synchronization hooks
-    hm.register_hook(after_add_econstraint, 'after_add_entity', 'EConstraint')
-    hm.register_hook(after_update_econstraint, 'after_update_entity', 'EConstraint')
+    hm.register_hook(after_add_econstraint, 'after_add_entity', 'CWConstraint')
+    hm.register_hook(after_update_econstraint, 'after_update_entity', 'CWConstraint')
     hm.register_hook(before_delete_constrained_by, 'before_delete_relation', 'constrained_by')
     hm.register_hook(after_add_constrained_by, 'after_add_relation', 'constrained_by')
     # permissions synchronisation ################
--- a/server/schemaserial.py	Fri Apr 17 13:21:05 2009 +0200
+++ b/server/schemaserial.py	Fri Apr 17 16:55:37 2009 +0200
@@ -1,11 +1,12 @@
 """functions for schema / permissions (de)serialization using RQL
 
 :organization: Logilab
-:copyright: 2001-2008 LOGILAB S.A. (Paris, FRANCE), all rights reserved.
+:copyright: 2001-2009 LOGILAB S.A. (Paris, FRANCE), all rights reserved.
 :contact: http://www.logilab.fr/ -- mailto:contact@logilab.fr
 """
 __docformat__ = "restructuredtext en"
 
+import sys
 from itertools import chain
 
 from logilab.common.shellutils import ProgressBar
@@ -18,12 +19,12 @@
     """create a group mapping from an rql cursor
 
     A group mapping has standard group names as key (managers, owners at least)
-    and the actual EGroup entity's eid as associated value.
+    and the actual CWGroup entity's eid as associated value.
     In interactive mode (the default), missing groups'eid will be prompted
     from the user.
     """
     res = {}
-    for eid, name in cursor.execute('Any G, N WHERE G is EGroup, G name N'):
+    for eid, name in cursor.execute('Any G, N WHERE G is CWGroup, G name N'):
         res[name] = eid
     if not interactive:
         return res
@@ -46,18 +47,68 @@
                     continue
     return res
 
+def _set_sql_prefix(prefix):
+    """3.2.0 migration function: allow to unset/reset SQL_PREFIX"""
+    for module in ('checkintegrity', 'migractions', 'schemahooks',
+                   'sources.rql2sql', 'sources.native'):
+        try:
+            sys.modules['cubicweb.server.%s' % module].SQL_PREFIX = prefix
+            print 'changed SQL_PREFIX for %s' % module
+        except KeyError:
+            pass
+        
+def _update_database(schema, sqlcu):
+    """3.2.0 migration function: update database schema by adding SQL_PREFIX to
+    entity type tables and columns
+    """
+    for etype in schema.entities():
+        if etype.is_final():
+            continue
+        try:
+            sql = 'ALTER TABLE %s RENAME TO cw_%s' % (
+                etype, ETYPE_NAME_MAP.get(etype, etype))
+            print sql
+            sqlcu.execute(sql)
+        except:
+            pass
+        for rschema in etype.subject_relations():
+            if rschema == 'has_text':
+                continue
+            if rschema.is_final() or rschema.inlined:
+                sql = 'ALTER TABLE cw_%s RENAME %s TO cw_%s' % (
+                    etype, rschema, rschema)
+                print sql
+                sqlcu.execute(sql)
+
 # schema / perms deserialization ##############################################
 
 def deserialize_schema(schema, session):
     """return a schema according to information stored in an rql database
-    as ERType and EEType entities
+    as CWRType and CWEType entities
     """
+    #
+    repo = session.repo
+    sqlcu = session.pool['system']
+    _3_2_migration = False
+    if 'eetype' in [t.lower() for t in repo.system_source.dbhelper.list_tables(sqlcu)]:
+        _3_2_migration = True
+        # 3.2 migration
+        _set_sql_prefix('')
+        # first rename entity types whose name changed in 3.2 without adding the
+        # cw_ prefix
+        for etype in ('EFRDef', 'ENFRDef', 'ERType', 'EEType',
+                      'EConstraintType', 'EConstraint', 'EGroup', 'EUser',
+                      'ECache', 'EPermission', 'EProperty'):
+            sql = 'ALTER TABLE %s RENAME TO %s' % (etype, ETYPE_NAME_MAP[etype])
+            print sql
+            sqlcu.execute(sql)
+        # other table renaming done once schema has been readen
     # print 'reading schema from the database...'
     index = {}
     permsdict = deserialize_ertype_permissions(session)
     schema.reading_from_database = True
     for eid, etype, desc, meta in session.execute('Any X, N, D, M WHERE '
-                                                  'X is EEType, X name N, '
+                                                  'X is CWEType, X name N, '
                                                   'X description D, X meta M',
                                                   build_descr=False):
         # base types are already in the schema, skip them
@@ -70,7 +121,7 @@
         if etype in ETYPE_NAME_MAP: # XXX <2.45 bw compat
             print 'fixing etype name from %s to %s' % (etype, ETYPE_NAME_MAP[etype])
             # can't use write rql queries at this point, use raw sql
-            session.system_sql('UPDATE EEType SET name=%(n)s WHERE eid=%(x)s',
+            session.system_sql('UPDATE CWEType SET name=%(n)s WHERE eid=%(x)s',
                                {'x': eid, 'n': ETYPE_NAME_MAP[etype]})
             session.system_sql('UPDATE entities SET type=%(n)s WHERE type=%(x)s',
                                {'x': etype, 'n': ETYPE_NAME_MAP[etype]})
@@ -91,7 +142,7 @@
         index[eid] = eschema
         set_perms(eschema, permsdict.get(eid, {}))
     try:
-        rset = session.execute('Any XN, ETN WHERE X is EEType, X name XN, '
+        rset = session.execute('Any XN, ETN WHERE X is CWEType, X name XN, '
                                'X specializes ET, ET name ETN')
     except: # `specializes` relation not available for versions prior to 2.50
         session.rollback(False)
@@ -102,7 +153,7 @@
             eschema._specialized_type = stype
             seschema._specialized_by.append(etype)
     for eid, rtype, desc, meta, sym, il in session.execute(
-        'Any X,N,D,M,S,I WHERE X is ERType, X name N, X description D, '
+        'Any X,N,D,M,S,I WHERE X is CWRType, X name N, X description D, '
         'X meta M, X symetric S, X inlined I', build_descr=False):
         try:
             # bw compat: fulltext_container added in 2.47
@@ -119,7 +170,7 @@
         set_perms(rschema, permsdict.get(eid, {}))        
     cstrsdict = deserialize_rdef_constraints(session)
     for values in session.execute(
-        'Any X,SE,RT,OE,CARD,ORD,DESC,IDX,FTIDX,I18N,DFLT WHERE X is EFRDef,'
+        'Any X,SE,RT,OE,CARD,ORD,DESC,IDX,FTIDX,I18N,DFLT WHERE X is CWAttribute,'
         'X relation_type RT, X cardinality CARD, X ordernum ORD, X indexed IDX,'
         'X description DESC, X internationalizable I18N, X defaultval DFLT,'
         'X fulltextindexed FTIDX, X from_entity SE, X to_entity OE',
@@ -137,7 +188,7 @@
                                   default=default, eid=rdefeid)
         schema.add_relation_def(rdef)
     for values in session.execute(
-        'Any X,SE,RT,OE,CARD,ORD,DESC,C WHERE X is ENFRDef, X relation_type RT,'
+        'Any X,SE,RT,OE,CARD,ORD,DESC,C WHERE X is CWRelation, X relation_type RT,'
         'X cardinality CARD, X ordernum ORD, X description DESC, '
         'X from_entity SE, X to_entity OE, X composite C', build_descr=False):
         rdefeid, seid, reid, teid, card, ord, desc, c = values
@@ -151,6 +202,9 @@
                                   eid=rdefeid)
         schema.add_relation_def(rdef)
     schema.infer_specialization_rules()
+    if _3_2_migration:
+        _update_database(schema, sqlcu)
+        _set_sql_prefix('cw_')
     session.commit()
     schema.reading_from_database = False
 
@@ -159,11 +213,11 @@
     """return sect action:groups associations for the given
     entity or relation schema with its eid, according to schema's
     permissions stored in the database as [read|add|delete|update]_permission
-    relations between EEType/ERType and EGroup entities
+    relations between CWEType/CWRType and CWGroup entities
     """
     res = {}
     for action in ('read', 'add', 'update', 'delete'):
-        rql = 'Any E,N WHERE G is EGroup, G name N, E %s_permission G' % action
+        rql = 'Any E,N WHERE G is CWGroup, G name N, E %s_permission G' % action
         for eid, gname in session.execute(rql, build_descr=False):
             res.setdefault(eid, {}).setdefault(action, []).append(gname)
         rql = ('Any E,X,EXPR,V WHERE X is RQLExpression, X expression EXPR, '
@@ -194,7 +248,7 @@
     """return the list of relation definition's constraints as instances"""
     res = {}
     for rdefeid, ceid, ct, val in session.execute(
-        'Any E, X,TN,V WHERE E constrained_by X, X is EConstraint, '
+        'Any E, X,TN,V WHERE E constrained_by X, X is CWConstraint, '
         'X cstrtype T, T name TN, X value V', build_descr=False):
         cstr = CONSTRAINTS[ct].deserialize(val)
         cstr.eid = ceid
@@ -215,7 +269,7 @@
         pb_size = len(aller) + len(CONSTRAINTS) + len([x for x in eschemas if x.specializes()])
         pb = ProgressBar(pb_size)
     for cstrtype in CONSTRAINTS:
-        rql = 'INSERT EConstraintType X: X name "%s"' % cstrtype
+        rql = 'INSERT CWConstraintType X: X name "%s"' % cstrtype
         if verbose:
             print rql
         cursor.execute(rql)
@@ -341,7 +395,7 @@
 
 def schema2rql(schema, skip=None, allow=None):
     """return a list of rql insert statements to enter the schema in the
-    database as ERType and EEType entities
+    database as CWRType and CWEType entities
     """
     assert not (skip is not None and allow is not None), \
            'can\'t use both skip and allow'
@@ -359,12 +413,12 @@
 
 def eschema2rql(eschema):
     """return a list of rql insert statements to enter an entity schema
-    in the database as an EEType entity
+    in the database as an CWEType entity
     """
     relations, values = eschema_relations_values(eschema)
     # NOTE: 'specializes' relation can't be inserted here since there's no
     # way to make sure the parent type is inserted before the child type
-    yield 'INSERT EEType X: %s' % ','.join(relations) , values
+    yield 'INSERT CWEType X: %s' % ','.join(relations) , values
 
 def specialize2rql(schema):
     for eschema in schema.entities():
@@ -379,12 +433,12 @@
 
 def rschema2rql(rschema, addrdef=True):
     """return a list of rql insert statements to enter a relation schema
-    in the database as an ERType entity
+    in the database as an CWRType entity
     """
     if rschema.type == 'has_text':
         return
     relations, values = rschema_relations_values(rschema)
-    yield 'INSERT ERType X: %s' % ','.join(relations), values
+    yield 'INSERT CWRType X: %s' % ','.join(relations), values
     if addrdef:
         for rql, values in rdef2rql(rschema):
             yield rql, values
@@ -401,17 +455,17 @@
     relations, values = frdef_relations_values(rschema, objtype, props)
     relations.append(_LOCATE_RDEF_RQL0)
     values.update({'se': str(subjtype), 'rt': str(rschema), 'oe': str(objtype)})
-    yield 'INSERT EFRDef X: %s WHERE %s' % (','.join(relations), _LOCATE_RDEF_RQL1), values
+    yield 'INSERT CWAttribute X: %s WHERE %s' % (','.join(relations), _LOCATE_RDEF_RQL1), values
     for rql, values in rdefrelations2rql(rschema, subjtype, objtype, props):
-        yield rql + ', EDEF is EFRDef', values
+        yield rql + ', EDEF is CWAttribute', values
             
 def nfrdef2rql(rschema, subjtype, objtype, props):
     relations, values = nfrdef_relations_values(rschema, objtype, props)
     relations.append(_LOCATE_RDEF_RQL0)
     values.update({'se': str(subjtype), 'rt': str(rschema), 'oe': str(objtype)})
-    yield 'INSERT ENFRDef X: %s WHERE %s' % (','.join(relations), _LOCATE_RDEF_RQL1), values
+    yield 'INSERT CWRelation X: %s WHERE %s' % (','.join(relations), _LOCATE_RDEF_RQL1), values
     for rql, values in rdefrelations2rql(rschema, subjtype, objtype, props):
-        yield rql + ', EDEF is ENFRDef', values
+        yield rql + ', EDEF is CWRelation', values
                 
 def rdefrelations2rql(rschema, subjtype, objtype, props):
     iterators = []
@@ -423,14 +477,14 @@
     values = {'ctname': unicode(constraint.type()),
               'value': unicode(constraint.serialize()),
               'rt': str(rschema), 'se': str(subjtype), 'oe': str(objtype)}
-    yield 'INSERT EConstraint X: X value %(value)s, X cstrtype CT, EDEF constrained_by X WHERE \
+    yield 'INSERT CWConstraint X: X value %(value)s, X cstrtype CT, EDEF constrained_by X WHERE \
 CT name %(ctname)s, EDEF relation_type ER, EDEF from_entity SE, EDEF to_entity OE, \
 ER name %(rt)s, SE name %(se)s, OE name %(oe)s', values
 
 def perms2rql(schema, groupmapping):
     """return rql insert statements to enter the schema's permissions in
     the database as [read|add|delete|update]_permission relations between
-    EEType/ERType and EGroup entities
+    CWEType/CWRType and CWGroup entities
 
     groupmapping is a dictionnary mapping standard group names to
     eids
@@ -443,10 +497,10 @@
 def erperms2rql(erschema, groupmapping):
     """return rql insert statements to enter the entity or relation
     schema's permissions in the database as
-    [read|add|delete|update]_permission relations between EEType/ERType
-    and EGroup entities
+    [read|add|delete|update]_permission relations between CWEType/CWRType
+    and CWGroup entities
     """
-    etype = isinstance(erschema, schemamod.EntitySchema) and 'EEType' or 'ERType'
+    etype = isinstance(erschema, schemamod.EntitySchema) and 'CWEType' or 'CWRType'
     for action in erschema.ACTIONS:
         for group in sorted(erschema.get_groups(action)):
             try:
@@ -465,12 +519,12 @@
 def updateeschema2rql(eschema):
     relations, values = eschema_relations_values(eschema)
     values['et'] = eschema.type
-    yield 'SET %s WHERE X is EEType, X name %%(et)s' % ','.join(relations), values
+    yield 'SET %s WHERE X is CWEType, X name %%(et)s' % ','.join(relations), values
 
 def updaterschema2rql(rschema):
     relations, values = rschema_relations_values(rschema)
     values['rt'] = rschema.type
-    yield 'SET %s WHERE X is ERType, X name %%(rt)s' % ','.join(relations), values
+    yield 'SET %s WHERE X is CWRType, X name %%(rt)s' % ','.join(relations), values
             
 def updaterdef2rql(rschema, subjtype=None, objtype=None, props=None):
     genmap = {True: updatefrdef2rql, False: updatenfrdef2rql}
@@ -479,13 +533,13 @@
 def updatefrdef2rql(rschema, subjtype, objtype, props):
     relations, values = frdef_relations_values(rschema, objtype, props)
     values.update({'se': subjtype, 'rt': str(rschema), 'oe': objtype})
-    yield 'SET %s WHERE %s, %s, X is EFRDef' % (','.join(relations),
+    yield 'SET %s WHERE %s, %s, X is CWAttribute' % (','.join(relations),
                                                  _LOCATE_RDEF_RQL0,
                                                  _LOCATE_RDEF_RQL1), values
             
 def updatenfrdef2rql(rschema, subjtype, objtype, props):
     relations, values = nfrdef_relations_values(rschema, objtype, props)
     values.update({'se': subjtype, 'rt': str(rschema), 'oe': objtype})
-    yield 'SET %s WHERE %s, %s, X is ENFRDef' % (','.join(relations),
+    yield 'SET %s WHERE %s, %s, X is CWRelation' % (','.join(relations),
                                                  _LOCATE_RDEF_RQL0,
                                                  _LOCATE_RDEF_RQL1), values
--- a/server/sources/__init__.py	Fri Apr 17 13:21:05 2009 +0200
+++ b/server/sources/__init__.py	Fri Apr 17 16:55:37 2009 +0200
@@ -229,8 +229,8 @@
         pass
     
     def authenticate(self, session, login, password):
-        """if the source support EUser entity type, it should implements
-        this method which should return EUser eid for the given login/password
+        """if the source support CWUser entity type, it should implements
+        this method which should return CWUser eid for the given login/password
         if this account is defined in this source and valid login / password is
         given. Else raise `AuthenticationError`
         """
--- a/server/sources/ldapuser.py	Fri Apr 17 13:21:05 2009 +0200
+++ b/server/sources/ldapuser.py	Fri Apr 17 16:55:37 2009 +0200
@@ -1,6 +1,6 @@
 """cubicweb ldap user source
 
-this source is for now limited to a read-only EUser source
+this source is for now limited to a read-only CWUser source
 
 :organization: Logilab
 :copyright: 2003-2009 LOGILAB S.A. (Paris, FRANCE), all rights reserved.
@@ -51,8 +51,8 @@
 
 
 class LDAPUserSource(AbstractSource):
-    """LDAP read-only EUser source"""
-    support_entities = {'EUser': False} 
+    """LDAP read-only CWUser source"""
+    support_entities = {'CWUser': False} 
 
     port = None
     
@@ -200,7 +200,7 @@
         return ConnectionWrapper(self._conn)
     
     def authenticate(self, session, login, password):
-        """return EUser eid for the given login/password if this account is
+        """return CWUser eid for the given login/password if this account is
         defined in this source, else raise `AuthenticationError`
 
         two queries are needed since passwords are stored crypted, so we have
@@ -224,7 +224,7 @@
         except:
             # Something went wrong, most likely bad credentials
             raise AuthenticationError()
-        return self.extid2eid(user['dn'], 'EUser', session)
+        return self.extid2eid(user['dn'], 'CWUser', session)
 
     def ldap_name(self, var):
         if var.stinfo['relations']:
@@ -294,7 +294,7 @@
         mainvars = []
         for varname in rqlst.defined_vars:
             for sol in rqlst.solutions:
-                if sol[varname] == 'EUser':
+                if sol[varname] == 'CWUser':
                     mainvars.append(varname)
                     break
         assert mainvars
@@ -326,7 +326,7 @@
             filteredres = []
             for resdict in res:
                 # get sure the entity exists in the system table
-                eid = self.extid2eid(resdict['dn'], 'EUser', session)
+                eid = self.extid2eid(resdict['dn'], 'CWUser', session)
                 for eidfilter in eidfilters:
                     if not eidfilter(eid):
                         break
@@ -403,7 +403,7 @@
         except ldap.PARTIAL_RESULTS:
             res = cnx.result(all=0)[1]
         except ldap.NO_SUCH_OBJECT:
-            eid = self.extid2eid(base, 'EUser', session, insert=False)
+            eid = self.extid2eid(base, 'CWUser', session, insert=False)
             if eid:
                 self.warning('deleting ldap user with eid %s and dn %s',
                              eid, base)
--- a/server/sources/native.py	Fri Apr 17 13:21:05 2009 +0200
+++ b/server/sources/native.py	Fri Apr 17 16:55:37 2009 +0200
@@ -85,9 +85,9 @@
     # need default value on class since migration doesn't call init method
     has_deleted_entitites_table = True
     
-    passwd_rql = "Any P WHERE X is EUser, X login %(login)s, X upassword P"
-    auth_rql = "Any X WHERE X is EUser, X login %(login)s, X upassword %(pwd)s"
-    _sols = ({'X': 'EUser', 'P': 'Password'},)
+    passwd_rql = "Any P WHERE X is CWUser, X login %(login)s, X upassword P"
+    auth_rql = "Any X WHERE X is CWUser, X login %(login)s, X upassword %(pwd)s"
+    _sols = ({'X': 'CWUser', 'P': 'Password'},)
     
     options = (
         ('db-driver',
@@ -199,7 +199,7 @@
             self._rql_sqlgen.schema = schema
         except AttributeError:
             pass # __init__
-        if 'EUser' in schema: # probably an empty schema if not true...
+        if 'CWUser' in schema: # probably an empty schema if not true...
             # rql syntax trees used to authenticate users
             self._passwd_rqlst = self.compile_rql(self.passwd_rql)
             self._auth_rqlst = self.compile_rql(self.auth_rql)
@@ -221,7 +221,7 @@
         return True #not rtype == 'content_for'
 
     def authenticate(self, session, login, password):
-        """return EUser eid for the given login/password if this account is
+        """return CWUser eid for the given login/password if this account is
         defined in this source, else raise `AuthenticationError`
 
         two queries are needed since passwords are stored crypted, so we have
--- a/server/sources/pyrorql.py	Fri Apr 17 13:21:05 2009 +0200
+++ b/server/sources/pyrorql.py	Fri Apr 17 16:55:37 2009 +0200
@@ -134,13 +134,13 @@
 
     def last_update_time(self):
         pkey = u'sources.%s.latest-update-time' % self.uri
-        rql = 'Any V WHERE X is EProperty, X value V, X pkey %(k)s'
+        rql = 'Any V WHERE X is CWProperty, X value V, X pkey %(k)s'
         session = self.repo.internal_session()
         try:
             rset = session.execute(rql, {'k': pkey})
             if not rset:
                 # insert it
-                session.execute('INSERT EProperty X: X pkey %(k)s, X value %(v)s',
+                session.execute('INSERT CWProperty X: X pkey %(k)s, X value %(v)s',
                                 {'k': pkey, 'v': u'0'})
                 session.commit()
                 timestamp = 0
--- a/server/sources/rql2sql.py	Fri Apr 17 13:21:05 2009 +0200
+++ b/server/sources/rql2sql.py	Fri Apr 17 16:55:37 2009 +0200
@@ -3,14 +3,14 @@
 
 SQL queries optimization
 ~~~~~~~~~~~~~~~~~~~~~~~~
-1. EUser X WHERE X in_group G, G name 'users':
+1. CWUser X WHERE X in_group G, G name 'users':
 
-   EUser is the only subject entity type for the in_group relation,
+   CWUser is the only subject entity type for the in_group relation,
    which allow us to do ::
 
-     SELECT eid_from FROM in_group, EGroup
-     WHERE in_group.eid_to = EGroup.eid_from
-     AND EGroup.name = 'users'
+     SELECT eid_from FROM in_group, CWGroup
+     WHERE in_group.eid_to = CWGroup.eid_from
+     AND CWGroup.name = 'users'
 
 
 2. Any X WHERE X nonfinal1 Y, Y nonfinal2 Z
--- a/server/test/data/migrschema/relations.rel	Fri Apr 17 13:21:05 2009 +0200
+++ b/server/test/data/migrschema/relations.rel	Fri Apr 17 16:55:37 2009 +0200
@@ -1,6 +1,6 @@
 Personne travaille Societe
 Personne evaluee Note
-EUser evaluee Note
+CWUser evaluee Note
 Societe evaluee Note
 Personne concerne Affaire
 Affaire concerne Societe
--- a/server/test/data/schema/Affaire.py	Fri Apr 17 13:21:05 2009 +0200
+++ b/server/test/data/schema/Affaire.py	Fri Apr 17 16:55:37 2009 +0200
@@ -22,7 +22,7 @@
     invoiced = Int()
 
     depends_on = SubjectRelation('Affaire')
-    require_permission = SubjectRelation('EPermission')
+    require_permission = SubjectRelation('CWPermission')
     
 class concerne(RelationType):
     permissions = {
--- a/server/test/data/schema/custom.py	Fri Apr 17 13:21:05 2009 +0200
+++ b/server/test/data/schema/custom.py	Fri Apr 17 16:55:37 2009 +0200
@@ -30,5 +30,5 @@
     subject = ('Bookmark', 'Note')
     object = ('Bookmark', 'Note')
 
-_euser = import_schema('base').EUser
+_euser = import_schema('base').CWUser
 _euser.__relations__[0].fulltextindexed = True
--- a/server/test/data/schema/relations.rel	Fri Apr 17 13:21:05 2009 +0200
+++ b/server/test/data/schema/relations.rel	Fri Apr 17 16:55:37 2009 +0200
@@ -1,13 +1,13 @@
 Personne travaille Societe
 Personne evaluee Note
-EUser evaluee Note
+CWUser evaluee Note
 Societe evaluee Note
 Personne concerne Affaire
 Affaire concerne Societe
 Affaire concerne Note
 
 Note ecrit_par Personne inline CONSTRAINT E concerns P, X version_of P
-Note ecrit_par EUser inline CONSTRAINT
+Note ecrit_par CWUser inline CONSTRAINT
 Personne connait Personne symetric
 
 # not inlined intentionaly
@@ -16,7 +16,7 @@
 Note inline1 Affaire inline
 Personne inline2 Affaire inline
 
-Note todo_by EUser
+Note todo_by CWUser
 Affaire todo_by Personne
 
 Folder see_also Folder
@@ -24,10 +24,10 @@
 
 Affaire documented_by Card
 
-EUser copain EUser
+CWUser copain CWUser
 
-Tag tags EUser
-Tag tags EGroup
+Tag tags CWUser
+Tag tags CWGroup
 Tag tags State
 Tag tags Note
 Tag tags Card
@@ -36,11 +36,11 @@
 Note filed_under Folder
 Affaire filed_under Folder
 
-Card require_permission EPermission
-Note require_permission EPermission
-Personne require_permission EPermission
+Card require_permission CWPermission
+Note require_permission CWPermission
+Personne require_permission CWPermission
 
-EPermission require_state State
+CWPermission require_state State
 
 Note migrated_from Note
 
--- a/server/test/unittest_hookhelper.py	Fri Apr 17 13:21:05 2009 +0200
+++ b/server/test/unittest_hookhelper.py	Fri Apr 17 16:55:37 2009 +0200
@@ -59,7 +59,7 @@
             SendMailOp(session, msg=content, recipients=['test@logilab.fr'])
         self.hm.register_hook(in_state_changed,
                              'before_add_relation', 'in_state')
-        self.execute('INSERT EUser X: X login "paf", X upassword "wouf", X in_state S, X in_group G WHERE S name "activated", G name "users"')
+        self.execute('INSERT CWUser X: X login "paf", X upassword "wouf", X in_state S, X in_group G WHERE S name "activated", G name "users"')
         self.assertEquals(result, [None])
         searchedops = [op for op in self.session.pending_operations
                        if isinstance(op, SendMailOp)]
--- a/server/test/unittest_hooks.py	Fri Apr 17 13:21:05 2009 +0200
+++ b/server/test/unittest_hooks.py	Fri Apr 17 16:55:37 2009 +0200
@@ -25,14 +25,14 @@
         
     def test_delete_internal_entities(self):
         self.assertRaises(RepositoryError, self.execute,
-                          'DELETE EEType X WHERE X name "EEType"')
+                          'DELETE CWEType X WHERE X name "CWEType"')
         self.assertRaises(RepositoryError, self.execute,
-                          'DELETE ERType X WHERE X name "relation_type"')
+                          'DELETE CWRType X WHERE X name "relation_type"')
         self.assertRaises(RepositoryError, self.execute,
-                          'DELETE EGroup X WHERE X name "owners"')
+                          'DELETE CWGroup X WHERE X name "owners"')
 
     def test_delete_required_relations_subject(self):
-        self.execute('INSERT EUser X: X login "toto", X upassword "hop", X in_group Y, X in_state S '
+        self.execute('INSERT CWUser X: X login "toto", X upassword "hop", X in_group Y, X in_state S '
                      'WHERE Y name "users", S name "activated"')
         self.commit()
         self.execute('DELETE X in_group Y WHERE X login "toto", Y name "users"')
@@ -47,17 +47,17 @@
     def test_static_vocabulary_check(self):
         self.assertRaises(ValidationError,
                           self.execute,
-                          'SET X composite "whatever" WHERE X from_entity FE, FE name "EUser", X relation_type RT, RT name "in_group"')
+                          'SET X composite "whatever" WHERE X from_entity FE, FE name "CWUser", X relation_type RT, RT name "in_group"')
     
     def test_missing_required_relations_subject_inline(self):
         # missing in_group relation 
-        self.execute('INSERT EUser X: X login "toto", X upassword "hop"')
+        self.execute('INSERT CWUser X: X login "toto", X upassword "hop"')
         self.assertRaises(ValidationError,
                           self.commit)
 
     def test_delete_if_singlecard1(self):
         self.assertEquals(self.repo.schema['in_state'].inlined, False)
-        ueid, = self.execute('INSERT EUser X: X login "toto", X upassword "hop", X in_group Y, X in_state S '
+        ueid, = self.execute('INSERT CWUser X: X login "toto", X upassword "hop", X in_group Y, X in_state S '
                              'WHERE Y name "users", S name "activated"')[0]
         self.commit()
         self.execute('SET X in_state S WHERE S name "deactivated", X eid %(x)s', {'x': ueid})
@@ -119,7 +119,7 @@
         self.assertEquals(rset.get_entity(0, 0).reverse_parts[0].messageid, '<2345>')
 
     def test_unsatisfied_constraints(self):
-        self.execute('INSERT ENFRDef X: X from_entity FE, X relation_type RT, X to_entity TE '
+        self.execute('INSERT CWRelation X: X from_entity FE, X relation_type RT, X to_entity TE '
                      'WHERE FE name "Affaire", RT name "concerne", TE name "String"')
         self.assertRaises(ValidationError,
                           self.commit)
@@ -160,7 +160,7 @@
         self.commit()
         cnxid = self.repo.connect(u'toto', 'hop')
         self.failIfEqual(cnxid, self.cnxid)
-        self.execute('DELETE EUser X WHERE X login "toto"')
+        self.execute('DELETE CWUser X WHERE X login "toto"')
         self.repo.execute(cnxid, 'State X')
         self.commit()
         self.assertRaises(BadConnectionId,
@@ -194,47 +194,47 @@
         self.commit()
         self.failIf(self.execute('Any X WHERE X created_by Y, X eid >= %(x)s', {'x': eid}))
         
-class EPropertyHooksTC(RepositoryBasedTC):
+class CWPropertyHooksTC(RepositoryBasedTC):
     
     def test_unexistant_eproperty(self):
         ex = self.assertRaises(ValidationError,
-                          self.execute, 'INSERT EProperty X: X pkey "bla.bla", X value "hop", X for_user U')
+                          self.execute, 'INSERT CWProperty X: X pkey "bla.bla", X value "hop", X for_user U')
         self.assertEquals(ex.errors, {'pkey': 'unknown property key'})
         ex = self.assertRaises(ValidationError,
-                          self.execute, 'INSERT EProperty X: X pkey "bla.bla", X value "hop"')
+                          self.execute, 'INSERT CWProperty X: X pkey "bla.bla", X value "hop"')
         self.assertEquals(ex.errors, {'pkey': 'unknown property key'})
         
     def test_site_wide_eproperty(self):
         ex = self.assertRaises(ValidationError,
-                               self.execute, 'INSERT EProperty X: X pkey "ui.site-title", X value "hop", X for_user U')
+                               self.execute, 'INSERT CWProperty X: X pkey "ui.site-title", X value "hop", X for_user U')
         self.assertEquals(ex.errors, {'for_user': "site-wide property can't be set for user"})
         
     def test_bad_type_eproperty(self):
         ex = self.assertRaises(ValidationError,
-                               self.execute, 'INSERT EProperty X: X pkey "ui.language", X value "hop", X for_user U')
+                               self.execute, 'INSERT CWProperty X: X pkey "ui.language", X value "hop", X for_user U')
         self.assertEquals(ex.errors, {'value': u'unauthorized value'})
         ex = self.assertRaises(ValidationError,
-                          self.execute, 'INSERT EProperty X: X pkey "ui.language", X value "hop"')
+                          self.execute, 'INSERT CWProperty X: X pkey "ui.language", X value "hop"')
         self.assertEquals(ex.errors, {'value': u'unauthorized value'})
         
         
 class SchemaHooksTC(RepositoryBasedTC):
         
     def test_duplicate_etype_error(self):
-        # check we can't add a EEType or ERType entity if it already exists one
+        # check we can't add a CWEType or CWRType entity if it already exists one
         # with the same name
         #
         # according to hook order, we'll get a repository or validation error
         self.assertRaises((ValidationError, RepositoryError),
-                          self.execute, 'INSERT EEType X: X name "Societe"')
+                          self.execute, 'INSERT CWEType X: X name "Societe"')
         self.assertRaises((ValidationError, RepositoryError),
-                          self.execute, 'INSERT ERType X: X name "in_group"')
+                          self.execute, 'INSERT CWRType X: X name "in_group"')
         
     def test_validation_unique_constraint(self):
         self.assertRaises(ValidationError,
-                          self.execute, 'INSERT EUser X: X login "admin"')
+                          self.execute, 'INSERT CWUser X: X login "admin"')
         try:
-            self.execute('INSERT EUser X: X login "admin"')
+            self.execute('INSERT CWUser X: X login "admin"')
         except ValidationError, ex:
             self.assertIsInstance(ex.entity, int)
             self.assertEquals(ex.errors, {'login': 'the value "admin" is already used, use another one'})
@@ -264,26 +264,26 @@
         self.failIf(schema.has_entity('Societe2'))
         self.failIf(schema.has_entity('concerne2'))
         # schema should be update on insertion (after commit)
-        self.execute('INSERT EEType X: X name "Societe2", X description "", X meta FALSE, X final FALSE')
-        self.execute('INSERT ERType X: X name "concerne2", X description "", X meta FALSE, X final FALSE, X symetric FALSE')
+        self.execute('INSERT CWEType X: X name "Societe2", X description "", X meta FALSE, X final FALSE')
+        self.execute('INSERT CWRType X: X name "concerne2", X description "", X meta FALSE, X final FALSE, X symetric FALSE')
         self.failIf(schema.has_entity('Societe2'))
         self.failIf(schema.has_entity('concerne2'))
-        self.execute('SET X read_permission G WHERE X is EEType, X name "Societe2", G is EGroup')
-        self.execute('SET X read_permission G WHERE X is ERType, X name "concerne2", G is EGroup')
-        self.execute('SET X add_permission G WHERE X is EEType, X name "Societe2", G is EGroup, G name "managers"')
-        self.execute('SET X add_permission G WHERE X is ERType, X name "concerne2", G is EGroup, G name "managers"')
-        self.execute('SET X delete_permission G WHERE X is EEType, X name "Societe2", G is EGroup, G name "owners"')
-        self.execute('SET X delete_permission G WHERE X is ERType, X name "concerne2", G is EGroup, G name "owners"')
+        self.execute('SET X read_permission G WHERE X is CWEType, X name "Societe2", G is CWGroup')
+        self.execute('SET X read_permission G WHERE X is CWRType, X name "concerne2", G is CWGroup')
+        self.execute('SET X add_permission G WHERE X is CWEType, X name "Societe2", G is CWGroup, G name "managers"')
+        self.execute('SET X add_permission G WHERE X is CWRType, X name "concerne2", G is CWGroup, G name "managers"')
+        self.execute('SET X delete_permission G WHERE X is CWEType, X name "Societe2", G is CWGroup, G name "owners"')
+        self.execute('SET X delete_permission G WHERE X is CWRType, X name "concerne2", G is CWGroup, G name "owners"')
         # have to commit before adding definition relations
         self.commit()
         self.failUnless(schema.has_entity('Societe2'))
         self.failUnless(schema.has_relation('concerne2'))
-        self.execute('INSERT EFRDef X: X cardinality "11", X defaultval "noname", X indexed TRUE, X relation_type RT, X from_entity E, X to_entity F '
+        self.execute('INSERT CWAttribute X: X cardinality "11", X defaultval "noname", X indexed TRUE, X relation_type RT, X from_entity E, X to_entity F '
                      'WHERE RT name "nom", E name "Societe2", F name "String"')
         concerne2_rdef_eid = self.execute(
-            'INSERT ENFRDef X: X cardinality "**", X relation_type RT, X from_entity E, X to_entity E '
+            'INSERT CWRelation X: X cardinality "**", X relation_type RT, X from_entity E, X to_entity E '
             'WHERE RT name "concerne2", E name "Societe2"')[0][0]
-        self.execute('INSERT ENFRDef X: X cardinality "?*", X relation_type RT, X from_entity E, X to_entity C '
+        self.execute('INSERT CWRelation X: X cardinality "?*", X relation_type RT, X from_entity E, X to_entity C '
                      'WHERE RT name "comments", E name "Societe2", C name "Comment"')
         self.failIf('nom' in schema['Societe2'].subject_relations())
         self.failIf('concerne2' in schema['Societe2'].subject_relations())
@@ -299,17 +299,17 @@
         rset = self.execute('Any X WHERE X concerne2 Y')
         self.assertEquals(rset.rows, [[s2eid]])
         # check that when a relation definition is deleted, existing relations are deleted
-        self.execute('INSERT ENFRDef X: X cardinality "**", X relation_type RT, X from_entity E, X to_entity E '
+        self.execute('INSERT CWRelation X: X cardinality "**", X relation_type RT, X from_entity E, X to_entity E '
                      'WHERE RT name "concerne2", E name "Societe"')
         self.commit()
-        self.execute('DELETE ENFRDef X WHERE X eid %(x)s', {'x': concerne2_rdef_eid}, 'x')
+        self.execute('DELETE CWRelation X WHERE X eid %(x)s', {'x': concerne2_rdef_eid}, 'x')
         self.commit()
         self.failUnless('concerne2' in schema['Societe'].subject_relations())
         self.failIf('concerne2' in schema['Societe2'].subject_relations())
         self.failIf(self.execute('Any X WHERE X concerne2 Y'))
         # schema should be cleaned on delete (after commit)
-        self.execute('DELETE EEType X WHERE X name "Societe2"')
-        self.execute('DELETE ERType X WHERE X name "concerne2"')
+        self.execute('DELETE CWEType X WHERE X name "Societe2"')
+        self.execute('DELETE CWRType X WHERE X name "concerne2"')
         self.failUnless(self.index_exists('Societe2', 'nom'))
         self.failUnless(schema.has_entity('Societe2'))
         self.failUnless(schema.has_relation('concerne2'))
@@ -336,42 +336,42 @@
         
     def test_perms_synchronization_1(self):
         schema = self.repo.schema
-        self.assertEquals(schema['EUser'].get_groups('read'), set(('managers', 'users')))
-        self.failUnless(self.execute('Any X, Y WHERE X is EEType, X name "EUser", Y is EGroup, Y name "users"')[0])
-        self.execute('DELETE X read_permission Y WHERE X is EEType, X name "EUser", Y name "users"')
-        self.assertEquals(schema['EUser'].get_groups('read'), set(('managers', 'users', )))
+        self.assertEquals(schema['CWUser'].get_groups('read'), set(('managers', 'users')))
+        self.failUnless(self.execute('Any X, Y WHERE X is CWEType, X name "CWUser", Y is CWGroup, Y name "users"')[0])
+        self.execute('DELETE X read_permission Y WHERE X is CWEType, X name "CWUser", Y name "users"')
+        self.assertEquals(schema['CWUser'].get_groups('read'), set(('managers', 'users', )))
         self.commit()
-        self.assertEquals(schema['EUser'].get_groups('read'), set(('managers', )))
-        self.execute('SET X read_permission Y WHERE X is EEType, X name "EUser", Y name "users"')
+        self.assertEquals(schema['CWUser'].get_groups('read'), set(('managers', )))
+        self.execute('SET X read_permission Y WHERE X is CWEType, X name "CWUser", Y name "users"')
         self.commit()
-        self.assertEquals(schema['EUser'].get_groups('read'), set(('managers', 'users',)))
+        self.assertEquals(schema['CWUser'].get_groups('read'), set(('managers', 'users',)))
 
     def test_perms_synchronization_2(self):
         schema = self.repo.schema['in_group']
         self.assertEquals(schema.get_groups('read'), set(('managers', 'users', 'guests')))
-        self.execute('DELETE X read_permission Y WHERE X is ERType, X name "in_group", Y name "guests"')
+        self.execute('DELETE X read_permission Y WHERE X is CWRType, X name "in_group", Y name "guests"')
         self.assertEquals(schema.get_groups('read'), set(('managers', 'users', 'guests')))
         self.commit()
         self.assertEquals(schema.get_groups('read'), set(('managers', 'users')))
-        self.execute('SET X read_permission Y WHERE X is ERType, X name "in_group", Y name "guests"')
+        self.execute('SET X read_permission Y WHERE X is CWRType, X name "in_group", Y name "guests"')
         self.assertEquals(schema.get_groups('read'), set(('managers', 'users')))
         self.commit()
         self.assertEquals(schema.get_groups('read'), set(('managers', 'users', 'guests')))
 
     def test_nonregr_user_edit_itself(self):
         ueid = self.session.user.eid
-        groupeids = [eid for eid, in self.execute('EGroup G WHERE G name in ("managers", "users")')]
+        groupeids = [eid for eid, in self.execute('CWGroup G WHERE G name in ("managers", "users")')]
         self.execute('DELETE X in_group Y WHERE X eid %s' % ueid)
         self.execute('SET X surname "toto" WHERE X eid %s' % ueid)
         self.execute('SET X in_group Y WHERE X eid %s, Y name "managers"' % ueid)
         self.commit()
-        eeid = self.execute('Any X WHERE X is EEType, X name "EEType"')[0][0]
+        eeid = self.execute('Any X WHERE X is CWEType, X name "CWEType"')[0][0]
         self.execute('DELETE X read_permission Y WHERE X eid %s' % eeid)
         self.execute('SET X final FALSE WHERE X eid %s' % eeid)
         self.execute('SET X read_permission Y WHERE X eid %s, Y eid in (%s, %s)'
                      % (eeid, groupeids[0], groupeids[1]))
         self.commit()
-        self.execute('Any X WHERE X is EEType, X name "EEType"')
+        self.execute('Any X WHERE X is CWEType, X name "CWEType"')
 
     # schema modification hooks tests #########################################
     
@@ -432,7 +432,7 @@
         sqlcursor = self.session.pool['system']
         try:
             try:
-                self.execute('INSERT EConstraint X: X cstrtype CT, DEF constrained_by X '
+                self.execute('INSERT CWConstraint X: X cstrtype CT, DEF constrained_by X '
                              'WHERE CT name "UniqueConstraint", DEF relation_type RT, DEF from_entity E,'
                              'RT name "sujet", E name "Affaire"')
                 self.failIf(self.schema['Affaire'].has_unique_values('sujet'))
@@ -461,21 +461,21 @@
         RepositoryBasedTC.setUp(self)
         self.s_activated = self.execute('State X WHERE X name "activated"')[0][0]
         self.s_deactivated = self.execute('State X WHERE X name "deactivated"')[0][0]
-        self.s_dummy = self.execute('INSERT State X: X name "dummy", X state_of E WHERE E name "EUser"')[0][0]
+        self.s_dummy = self.execute('INSERT State X: X name "dummy", X state_of E WHERE E name "CWUser"')[0][0]
         self.create_user('stduser')
         # give access to users group on the user's wf transitions
         # so we can test wf enforcing on euser (managers don't have anymore this
         # enforcement
-        self.execute('SET X require_group G WHERE G name "users", X transition_of ET, ET name "EUser"')
+        self.execute('SET X require_group G WHERE G name "users", X transition_of ET, ET name "CWUser"')
         self.commit()
         
     def tearDown(self):
-        self.execute('DELETE X require_group G WHERE G name "users", X transition_of ET, ET name "EUser"')
+        self.execute('DELETE X require_group G WHERE G name "users", X transition_of ET, ET name "CWUser"')
         self.commit()
         RepositoryBasedTC.tearDown(self)
 
     def test_set_initial_state(self):
-        ueid = self.execute('INSERT EUser E: E login "x", E upassword "x", E in_group G '
+        ueid = self.execute('INSERT CWUser E: E login "x", E upassword "x", E in_group G '
                             'WHERE G name "users"')[0][0]
         self.failIf(self.execute('Any N WHERE S name N, X in_state S, X eid %(x)s',
                                  {'x' : ueid}))
@@ -488,11 +488,11 @@
         cnx = self.login('stduser')
         cu = cnx.cursor()
         self.assertRaises(ValidationError, cu.execute,
-                          'INSERT EUser X: X login "badaboum", X upassword %(pwd)s, '
+                          'INSERT CWUser X: X login "badaboum", X upassword %(pwd)s, '
                           'X in_state S WHERE S name "deactivated"', {'pwd': 'oops'})
         cnx.close()
         # though managers can do whatever he want
-        self.execute('INSERT EUser X: X login "badaboum", X upassword %(pwd)s, '
+        self.execute('INSERT CWUser X: X login "badaboum", X upassword %(pwd)s, '
                      'X in_state S, X in_group G WHERE S name "deactivated", G name "users"', {'pwd': 'oops'})
         self.commit()
         
--- a/server/test/unittest_hooksmanager.py	Fri Apr 17 13:21:05 2009 +0200
+++ b/server/test/unittest_hooksmanager.py	Fri Apr 17 16:55:37 2009 +0200
@@ -25,13 +25,13 @@
         self.assertRaises(AssertionError,
                           self.o.register_hook, self._hook, 'before_add_entiti')
         self.assertRaises(AssertionError,
-                          self.o.register_hook, self._hook, 'session_login', 'EEType')
+                          self.o.register_hook, self._hook, 'session_login', 'CWEType')
         self.assertRaises(AssertionError,
-                          self.o.register_hook, self._hook, 'session_logout', 'EEType')
+                          self.o.register_hook, self._hook, 'session_logout', 'CWEType')
         self.assertRaises(AssertionError,
-                          self.o.register_hook, self._hook, 'server_startup', 'EEType')
+                          self.o.register_hook, self._hook, 'server_startup', 'CWEType')
         self.assertRaises(AssertionError,
-                          self.o.register_hook, self._hook, 'server_shutdown', 'EEType')
+                          self.o.register_hook, self._hook, 'server_shutdown', 'CWEType')
         
     def test_register_hook1(self):
         self.o.register_hook(self._hook, 'before_add_entity')
--- a/server/test/unittest_ldapuser.py	Fri Apr 17 13:21:05 2009 +0200
+++ b/server/test/unittest_ldapuser.py	Fri Apr 17 16:55:37 2009 +0200
@@ -24,7 +24,7 @@
         # no such user
         raise AuthenticationError()
     # don't check upassword !
-    return self.extid2eid(user['dn'], 'EUser', session)
+    return self.extid2eid(user['dn'], 'CWUser', session)
 
 
 
@@ -45,7 +45,7 @@
         # sqlite since it doesn't support multiple connections on the same
         # database
         # so doing, ldap inserted users don't get removed between each test
-        rset = self.execute('EUser X')
+        rset = self.execute('CWUser X')
         self.commit()
         # check we get some users from ldap
         self.assert_(len(rset) > 1)
@@ -67,7 +67,7 @@
         
     def test_base(self):
         # check a known one
-        e = self.execute('EUser X WHERE X login "syt"').get_entity(0, 0)
+        e = self.execute('CWUser X WHERE X login "syt"').get_entity(0, 0)
         self.assertEquals(e.login, 'syt')
         e.complete()
         self.assertEquals(e.creation_date, None)
@@ -79,49 +79,49 @@
         self.assertEquals(e.created_by, [])
         self.assertEquals(e.primary_email[0].address, 'Sylvain Thenault')
         # email content should be indexed on the user
-        rset = self.execute('EUser X WHERE X has_text "thenault"')
+        rset = self.execute('CWUser X WHERE X has_text "thenault"')
         self.assertEquals(rset.rows, [[e.eid]])
 
     def test_not(self):
-        eid = self.execute('EUser X WHERE X login "syt"')[0][0]
-        rset = self.execute('EUser X WHERE NOT X eid %s' % eid)
+        eid = self.execute('CWUser X WHERE X login "syt"')[0][0]
+        rset = self.execute('CWUser X WHERE NOT X eid %s' % eid)
         self.assert_(rset)
         self.assert_(not eid in (r[0] for r in rset))
 
     def test_multiple(self):
-        seid = self.execute('EUser X WHERE X login "syt"')[0][0]
-        aeid = self.execute('EUser X WHERE X login "adim"')[0][0]
-        rset = self.execute('EUser X, Y WHERE X login "syt", Y login "adim"')
+        seid = self.execute('CWUser X WHERE X login "syt"')[0][0]
+        aeid = self.execute('CWUser X WHERE X login "adim"')[0][0]
+        rset = self.execute('CWUser X, Y WHERE X login "syt", Y login "adim"')
         self.assertEquals(rset.rows, [[seid, aeid]])
         rset = self.execute('Any X,Y,L WHERE X login L, X login "syt", Y login "adim"')
         self.assertEquals(rset.rows, [[seid, aeid, 'syt']])
 
     def test_in(self):
-        seid = self.execute('EUser X WHERE X login "syt"')[0][0]
-        aeid = self.execute('EUser X WHERE X login "adim"')[0][0]
+        seid = self.execute('CWUser X WHERE X login "syt"')[0][0]
+        aeid = self.execute('CWUser X WHERE X login "adim"')[0][0]
         rset = self.execute('Any X,L ORDERBY L WHERE X login IN("syt", "adim"), X login L')
         self.assertEquals(rset.rows, [[aeid, 'adim'], [seid, 'syt']])
 
     def test_relations(self):
-        eid = self.execute('EUser X WHERE X login "syt"')[0][0]
-        rset = self.execute('Any X,E WHERE X is EUser, X login L, X primary_email E')
+        eid = self.execute('CWUser X WHERE X login "syt"')[0][0]
+        rset = self.execute('Any X,E WHERE X is CWUser, X login L, X primary_email E')
         self.assert_(eid in (r[0] for r in rset))
-        rset = self.execute('Any X,L,E WHERE X is EUser, X login L, X primary_email E')
+        rset = self.execute('Any X,L,E WHERE X is CWUser, X login L, X primary_email E')
         self.assert_('syt' in (r[1] for r in rset))
 
     def test_count(self):
-        nbusers = self.execute('Any COUNT(X) WHERE X is EUser')[0][0]
+        nbusers = self.execute('Any COUNT(X) WHERE X is CWUser')[0][0]
         # just check this is a possible number
         self.assert_(nbusers > 1, nbusers)
         self.assert_(nbusers < 30, nbusers)
 
     def test_upper(self):
-        eid = self.execute('EUser X WHERE X login "syt"')[0][0]
+        eid = self.execute('CWUser X WHERE X login "syt"')[0][0]
         rset = self.execute('Any UPPER(L) WHERE X eid %s, X login L' % eid)
         self.assertEquals(rset[0][0], 'SYT')
 
     def test_unknown_attr(self):
-        eid = self.execute('EUser X WHERE X login "syt"')[0][0]
+        eid = self.execute('CWUser X WHERE X login "syt"')[0][0]
         rset = self.execute('Any L,C,M WHERE X eid %s, X login L, '
                             'X creation_date C, X modification_date M' % eid)
         self.assertEquals(rset[0][0], 'syt')
@@ -145,7 +145,7 @@
         # the related TrInfo has correct owner information
         self.execute('SET X in_group G WHERE X login "syt", G name "managers"')
         self.commit()
-        syt = self.execute('EUser X WHERE X login "syt"').get_entity(0, 0)
+        syt = self.execute('CWUser X WHERE X login "syt"').get_entity(0, 0)
         self.assertEquals([g.name for g in syt.in_group], ['managers', 'users'])
         self.patch_authenticate()
         cnx = self.login('syt', 'dummypassword')
@@ -153,7 +153,7 @@
         cu.execute('SET X in_state S WHERE X login "alf", S name "deactivated"')
         try:
             cnx.commit()
-            alf = self.execute('EUser X WHERE X login "alf"').get_entity(0, 0)
+            alf = self.execute('CWUser X WHERE X login "alf"').get_entity(0, 0)
             self.assertEquals(alf.in_state[0].name, 'deactivated')
             trinfo = alf.latest_trinfo()
             self.assertEquals(trinfo.owned_by[0].login, 'syt')
@@ -177,8 +177,8 @@
         self.failUnless(self.execute('Any X,Y WHERE X login "syt", Y login "cochon"'))
         
     def test_exists1(self):
-        self.add_entity('EGroup', name=u'bougloup1')
-        self.add_entity('EGroup', name=u'bougloup2')
+        self.add_entity('CWGroup', name=u'bougloup1')
+        self.add_entity('CWGroup', name=u'bougloup2')
         self.execute('SET U in_group G WHERE G name ~= "bougloup%", U login "admin"')
         self.execute('SET U in_group G WHERE G name = "bougloup1", U login "syt"')
         rset = self.execute('Any L,SN ORDERBY L WHERE X in_state S, S name SN, X login L, EXISTS(X in_group G, G name ~= "bougloup%")')
@@ -210,9 +210,9 @@
         self.execute('SET X copain Y WHERE X login "comme", Y login "billy"')
         self.execute('SET X copain Y WHERE X login "syt", Y login "billy"')
         # search for group name, login where
-        #   EUser copain with "comme" or "cochon" AND same login as the copain
+        #   CWUser copain with "comme" or "cochon" AND same login as the copain
         # OR
-        #   EUser in_state activated AND not copain with billy
+        #   CWUser in_state activated AND not copain with billy
         #
         # SO we expect everybody but "comme" and "syt"
         rset= self.execute('Any GN,L WHERE X in_group G, X login L, G name GN, '
@@ -243,13 +243,13 @@
                                               ['users', 'syt']])
         
     def test_cd_restriction(self):
-        rset = self.execute('EUser X WHERE X creation_date > "2009-02-01"')
+        rset = self.execute('CWUser X WHERE X creation_date > "2009-02-01"')
         self.assertEquals(len(rset), 2) # admin/anon but no ldap user since it doesn't support creation_date
         
     def test_union(self):
         afeids = self.execute('State X')
-        ueids = self.execute('EUser X')
-        rset = self.execute('(Any X WHERE X is State) UNION (Any X WHERE X is EUser)')
+        ueids = self.execute('CWUser X')
+        rset = self.execute('(Any X WHERE X is State) UNION (Any X WHERE X is CWUser)')
         self.assertEquals(sorted(r[0] for r in rset.rows),
                           sorted(r[0] for r in afeids + ueids))
 
@@ -301,7 +301,7 @@
         
     def test_nonregr5(self):
         # original jpl query:
-        # Any X, NOW - CD, P WHERE P is Project, U interested_in P, U is EUser, U login "sthenault", X concerns P, X creation_date CD ORDERBY CD DESC LIMIT 5
+        # Any X, NOW - CD, P WHERE P is Project, U interested_in P, U is CWUser, U login "sthenault", X concerns P, X creation_date CD ORDERBY CD DESC LIMIT 5
         rql = 'Any X, NOW - CD, P ORDERBY CD DESC LIMIT 5 WHERE P bookmarked_by U, U login "%s", P is X, X creation_date CD' % self.session.user.login
         self.execute(rql, )#{'x': })
         
@@ -309,7 +309,7 @@
         self.execute('Any B,U,UL GROUPBY B,U,UL WHERE B created_by U?, B is File '
                      'WITH U,UL BEING (Any U,UL WHERE ME eid %(x)s, (EXISTS(U identity ME) '
                      'OR (EXISTS(U in_group G, G name IN("managers", "staff")))) '
-                     'OR (EXISTS(U in_group H, ME in_group H, NOT H name "users")), U login UL, U is EUser)',
+                     'OR (EXISTS(U in_group H, ME in_group H, NOT H name "users")), U login UL, U is CWUser)',
                      {'x': self.session.user.eid})
 
 
@@ -363,12 +363,12 @@
         RQLGeneratorTC.tearDown(self)
         
     def test_base(self):
-        rqlst = self._prepare('EUser X WHERE X login "toto"').children[0]
+        rqlst = self._prepare('CWUser X WHERE X login "toto"').children[0]
         self.assertEquals(self.o.generate(rqlst, 'X')[1],
                           '(&(objectClass=top)(objectClass=posixAccount)(uid=toto))')
         
     def test_kwargs(self):
-        rqlst = self._prepare('EUser X WHERE X login %(x)s').children[0]
+        rqlst = self._prepare('CWUser X WHERE X login %(x)s').children[0]
         self.o._args = {'x': "toto"}
         self.assertEquals(self.o.generate(rqlst, 'X')[1],
                           '(&(objectClass=top)(objectClass=posixAccount)(uid=toto))')
--- a/server/test/unittest_migractions.py	Fri Apr 17 13:21:05 2009 +0200
+++ b/server/test/unittest_migractions.py	Fri Apr 17 16:55:37 2009 +0200
@@ -127,9 +127,9 @@
         self.failIf('filed_under2' in self.schema)
         self.mh.cmd_add_entity_type('Folder2')
         self.failUnless('Folder2' in self.schema)
-        self.failUnless(self.execute('EEType X WHERE X name "Folder2"'))
+        self.failUnless(self.execute('CWEType X WHERE X name "Folder2"'))
         self.failUnless('filed_under2' in self.schema)
-        self.failUnless(self.execute('ERType X WHERE X name "filed_under2"'))
+        self.failUnless(self.execute('CWRType X WHERE X name "filed_under2"'))
         self.assertEquals(sorted(str(rs) for rs in self.schema['Folder2'].subject_relations()),
                           ['created_by', 'creation_date', 'description', 'description_format', 'eid',
                            'filed_under2', 'has_text', 'identity', 'is', 'is_instance_of',
@@ -154,7 +154,7 @@
         eschema = self.schema.eschema('Folder2')
         self.mh.cmd_drop_entity_type('Folder2')
         self.failIf('Folder2' in self.schema)
-        self.failIf(self.execute('EEType X WHERE X name "Folder2"'))
+        self.failIf(self.execute('CWEType X WHERE X name "Folder2"'))
         # test automatic workflow deletion
         self.failIf(self.execute('State X WHERE NOT X state_of ET'))
         self.failIf(self.execute('Transition X WHERE NOT X transition_of ET'))
@@ -179,7 +179,7 @@
     def test_add_relation_definition(self):
         self.mh.cmd_add_relation_definition('Societe', 'in_state', 'State')
         self.assertEquals(sorted(self.schema['in_state'].subjects()),
-                          ['Affaire', 'Division', 'EUser', 'Note', 'Societe', 'SubDivision'])
+                          ['Affaire', 'Division', 'CWUser', 'Note', 'Societe', 'SubDivision'])
         self.assertEquals(self.schema['in_state'].objects(), ('State',))
 
     def test_add_relation_definition_nortype(self):
@@ -210,7 +210,7 @@
         self.mh.cmd_drop_relation_definition('Personne', 'evaluee', 'Note')
         self.failUnless('evaluee' in self.schema)
         self.assertEquals(sorted(self.schema['evaluee'].subjects()),
-                          ['Division', 'EUser', 'Societe', 'SubDivision'])
+                          ['Division', 'CWUser', 'Societe', 'SubDivision'])
         self.assertEquals(sorted(self.schema['evaluee'].objects()),
                           ['Note'])
 
@@ -257,7 +257,7 @@
         migrschema['Personne'].description = 'blabla bla'
         migrschema['titre'].description = 'usually a title' 
         migrschema['titre']._rproperties[('Personne', 'String')]['description'] = 'title for this person'
-#         rinorderbefore = cursor.execute('Any O,N WHERE X is EFRDef, X relation_type RT, RT name N,'
+#         rinorderbefore = cursor.execute('Any O,N WHERE X is CWAttribute, X relation_type RT, RT name N,'
 #                                         'X from_entity FE, FE name "Personne",'
 #                                         'X ordernum O ORDERBY O')
 #         expected = [u'creation_date', u'modification_date', u'nom', u'prenom',
@@ -279,7 +279,7 @@
         # schema and so behaviour is undefined
         # "civility" is also skipped since it may have been added by
         # test_rename_attribut :o/
-        rinorder = [n for n, in cursor.execute('Any N ORDERBY O WHERE X is EFRDef, X relation_type RT, RT name N,'
+        rinorder = [n for n, in cursor.execute('Any N ORDERBY O WHERE X is CWAttribute, X relation_type RT, RT name N,'
                                                'X from_entity FE, FE name "Personne",'
                                                'X ordernum O') if n not in ('sexe', 'description', 'civility')]
         expected = [u'nom', u'prenom', u'promo', u'ass', u'adel', u'titre',
@@ -338,14 +338,14 @@
         self.mh.rollback()
 
     def _erqlexpr_rset(self, action, ertype):
-        rql = 'RQLExpression X WHERE ET is EEType, ET %s_permission X, ET name %%(name)s' % action
+        rql = 'RQLExpression X WHERE ET is CWEType, ET %s_permission X, ET name %%(name)s' % action
         return self.mh.rqlcursor.execute(rql, {'name': ertype})
     def _erqlexpr_entity(self, action, ertype):
         rset = self._erqlexpr_rset(action, ertype)
         self.assertEquals(len(rset), 1)
         return rset.get_entity(0, 0)
     def _rrqlexpr_rset(self, action, ertype):
-        rql = 'RQLExpression X WHERE ET is ERType, ET %s_permission X, ET name %%(name)s' % action
+        rql = 'RQLExpression X WHERE ET is CWRType, ET %s_permission X, ET name %%(name)s' % action
         return self.mh.rqlcursor.execute(rql, {'name': ertype})
     def _rrqlexpr_entity(self, action, ertype):
         rset = self._rrqlexpr_rset(action, ertype)
@@ -355,14 +355,14 @@
     def test_set_size_constraint(self):
         # existing previous value
         try:
-            self.mh.cmd_set_size_constraint('EEType', 'name', 128)
+            self.mh.cmd_set_size_constraint('CWEType', 'name', 128)
         finally:
-            self.mh.cmd_set_size_constraint('EEType', 'name', 64)
+            self.mh.cmd_set_size_constraint('CWEType', 'name', 64)
         # non existing previous value
         try:
-            self.mh.cmd_set_size_constraint('EEType', 'description', 256)
+            self.mh.cmd_set_size_constraint('CWEType', 'description', 256)
         finally:
-            self.mh.cmd_set_size_constraint('EEType', 'description', None)
+            self.mh.cmd_set_size_constraint('CWEType', 'description', None)
 
     def test_add_remove_cube(self):
         cubes = set(self.config.cubes())
--- a/server/test/unittest_msplanner.py	Fri Apr 17 13:21:05 2009 +0200
+++ b/server/test/unittest_msplanner.py	Fri Apr 17 16:55:37 2009 +0200
@@ -19,7 +19,7 @@
 
 class FakeUserROSource(AbstractSource):
     uri = 'zzz'
-    support_entities = {'EUser': False}
+    support_entities = {'CWUser': False}
     support_relations = {}
     def syntax_tree_search(self, *args, **kwargs):
         return []
@@ -38,10 +38,10 @@
 
 X_ALL_SOLS = sorted([{'X': 'Affaire'}, {'X': 'Basket'}, {'X': 'Bookmark'},
                      {'X': 'Card'}, {'X': 'Comment'}, {'X': 'Division'},
-                     {'X': 'ECache'}, {'X': 'EConstraint'}, {'X': 'EConstraintType'},
-                     {'X': 'EEType'}, {'X': 'EFRDef'}, {'X': 'EGroup'},
-                     {'X': 'ENFRDef'}, {'X': 'EPermission'}, {'X': 'EProperty'},
-                     {'X': 'ERType'}, {'X': 'EUser'}, {'X': 'Email'},
+                     {'X': 'CWCache'}, {'X': 'CWConstraint'}, {'X': 'CWConstraintType'},
+                     {'X': 'CWEType'}, {'X': 'CWAttribute'}, {'X': 'CWGroup'},
+                     {'X': 'CWRelation'}, {'X': 'CWPermission'}, {'X': 'CWProperty'},
+                     {'X': 'CWRType'}, {'X': 'CWUser'}, {'X': 'Email'},
                      {'X': 'EmailAddress'}, {'X': 'EmailPart'}, {'X': 'EmailThread'},
                      {'X': 'File'}, {'X': 'Folder'}, {'X': 'Image'},
                      {'X': 'Note'}, {'X': 'Personne'}, {'X': 'RQLExpression'},
@@ -61,7 +61,7 @@
     """test planner related feature on a 3-sources repository:
     
     * system source supporting everything
-    * ldap source supporting EUser
+    * ldap source supporting CWUser
     * rql source supporting Card
     """
     repo = repo
@@ -79,11 +79,11 @@
         # add access to type attribute so S can't be invariant
         affreadperms[-1] = ERQLExpression('X concerne S?, S owned_by U, S type "X"')
         self.schema['Affaire']._groups['read'] = tuple(affreadperms)
-        # hijack EUser security
-        userreadperms = list(self.schema['EUser']._groups['read'])
+        # hijack CWUser security
+        userreadperms = list(self.schema['CWUser']._groups['read'])
         self.prevrqlexpr_user = userreadperms[-1]
         userreadperms[-1] = ERQLExpression('X owned_by U')
-        self.schema['EUser']._groups['read'] = tuple(userreadperms)
+        self.schema['CWUser']._groups['read'] = tuple(userreadperms)
         
         self.sources = self.o._repo.sources
         self.system = self.sources[-1]
@@ -115,10 +115,10 @@
         clear_cache(self.schema['Affaire'], 'ERSchema_get_rqlexprs')
         
     def restore_orig_euser_security(self):
-        userreadperms = list(self.schema['EUser']._groups['read'])
+        userreadperms = list(self.schema['CWUser']._groups['read'])
         userreadperms[-1] = self.prevrqlexpr_user
-        self.schema['EUser']._groups['read'] = tuple(userreadperms)
-        clear_cache(self.schema['EUser'], 'ERSchema_get_rqlexprs')
+        self.schema['CWUser']._groups['read'] = tuple(userreadperms)
+        clear_cache(self.schema['CWUser'], 'ERSchema_get_rqlexprs')
 
                   
 class PartPlanInformationTC(BaseMSPlannerTC):
@@ -143,13 +143,13 @@
         
     def test_simple_system_only(self):
         """retrieve entities only supported by the system source"""
-        self._test('EGroup X',
+        self._test('CWGroup X',
                    {self.system: {'X': s[0]}}, False)
         
     def test_simple_system_ldap(self):
-        """retrieve EUser X from both sources and return concatenation of results
+        """retrieve CWUser X from both sources and return concatenation of results
         """
-        self._test('EUser X',
+        self._test('CWUser X',
                    {self.system: {'X': s[0]}, self.ldap: {'X': s[0]}}, False)
         
     def test_simple_system_rql(self):
@@ -159,41 +159,41 @@
                    {self.system: {'X': s[0]}, self.rql: {'X': s[0]}}, False)
         
     def test_simple_eid_specified(self):
-        """retrieve EUser X from system source (eid is specified, can locate the entity)
+        """retrieve CWUser X from system source (eid is specified, can locate the entity)
         """
         ueid = self.session.user.eid
         self._test('Any X,L WHERE X eid %(x)s, X login L', {'x': ueid},
                    {self.system: {'X': s[0]}}, False)
         
     def test_simple_eid_invariant(self):
-        """retrieve EUser X from system source (eid is specified, can locate the entity)
+        """retrieve CWUser X from system source (eid is specified, can locate the entity)
         """
         ueid = self.session.user.eid
         self._test('Any X WHERE X eid %(x)s', {'x': ueid},
                    {self.system: {'x': s[0]}}, False)
         
     def test_simple_invariant(self):
-        """retrieve EUser X from system source only (X is invariant and in_group not supported by ldap source)
+        """retrieve CWUser X from system source only (X is invariant and in_group not supported by ldap source)
         """
-        self._test('Any X WHERE X is EUser, X in_group G, G name "users"',
+        self._test('Any X WHERE X is CWUser, X in_group G, G name "users"',
                    {self.system: {'X': s[0], 'G': s[0], 'in_group': s[0]}}, False)
         
     def test_security_has_text(self):
-        """retrieve EUser X from system source only (has_text not supported by ldap source)
+        """retrieve CWUser X from system source only (has_text not supported by ldap source)
         """
-        # specify EUser instead of any since the way this test is written we aren't well dealing
+        # specify CWUser instead of any since the way this test is written we aren't well dealing
         # with ambigous query (eg only considering the first solution)
-        self._test('EUser X WHERE X has_text "bla"',
+        self._test('CWUser X WHERE X has_text "bla"',
                    {self.system: {'X': s[0]}}, False)
         
     def test_complex_base(self):
         """
-        1. retrieve Any X, L WHERE X is EUser, X login L from system and ldap sources, store
+        1. retrieve Any X, L WHERE X is CWUser, X login L from system and ldap sources, store
            concatenation of results into a temporary table
         2. return the result of Any X, L WHERE X is TMP, X login L, X in_group G,
            G name 'users' on the system source
         """
-        self._test('Any X,L WHERE X is EUser, X in_group G, X login L, G name "users"',
+        self._test('Any X,L WHERE X is CWUser, X in_group G, X login L, G name "users"',
                    {self.system: {'X': s[0], 'G': s[0], 'in_group': s[0]},
                     self.ldap : {'X': s[0]}}, True)
 
@@ -222,7 +222,7 @@
                     self.ldap : {'X': s[0]}}, True)
 
     def test_complex_ambigous(self):
-        """retrieve EUser X from system and ldap sources, Person X from system source only
+        """retrieve CWUser X from system and ldap sources, Person X from system source only
         """
         self._test('Any X,F WHERE X firstname F',
                    {self.system: {'X': s[0, 1]},
@@ -370,61 +370,61 @@
     def test_simple_system_only(self):
         """retrieve entities only supported by the system source
         """
-        self._test('EGroup X',
-                   [('OneFetchStep', [('Any X WHERE X is EGroup', [{'X': 'EGroup'}])],
+        self._test('CWGroup X',
+                   [('OneFetchStep', [('Any X WHERE X is CWGroup', [{'X': 'CWGroup'}])],
                      None, None, [self.system], {}, [])])
 
     def test_simple_system_only_limit(self):
         """retrieve entities only supported by the system source
         """
-        self._test('EGroup X LIMIT 10',
-                   [('OneFetchStep', [('Any X LIMIT 10 WHERE X is EGroup', [{'X': 'EGroup'}])],
+        self._test('CWGroup X LIMIT 10',
+                   [('OneFetchStep', [('Any X LIMIT 10 WHERE X is CWGroup', [{'X': 'CWGroup'}])],
                      10, None, [self.system], {}, [])])
 
     def test_simple_system_only_limit_offset(self):
         """retrieve entities only supported by the system source
         """
-        self._test('EGroup X LIMIT 10 OFFSET 10',
-                   [('OneFetchStep', [('Any X LIMIT 10 OFFSET 10 WHERE X is EGroup', [{'X': 'EGroup'}])],
+        self._test('CWGroup X LIMIT 10 OFFSET 10',
+                   [('OneFetchStep', [('Any X LIMIT 10 OFFSET 10 WHERE X is CWGroup', [{'X': 'CWGroup'}])],
                      10, 10, [self.system], {}, [])])
         
     def test_simple_system_ldap(self):
-        """retrieve EUser X from both sources and return concatenation of results
+        """retrieve CWUser X from both sources and return concatenation of results
         """
-        self._test('EUser X',
-                   [('OneFetchStep', [('Any X WHERE X is EUser', [{'X': 'EUser'}])],
+        self._test('CWUser X',
+                   [('OneFetchStep', [('Any X WHERE X is CWUser', [{'X': 'CWUser'}])],
                      None, None, [self.ldap, self.system], {}, [])])
         
     def test_simple_system_ldap_limit(self):
-        """retrieve EUser X from both sources and return concatenation of results
+        """retrieve CWUser X from both sources and return concatenation of results
         """
-        self._test('EUser X LIMIT 10',
-                   [('OneFetchStep', [('Any X LIMIT 10 WHERE X is EUser', [{'X': 'EUser'}])],
+        self._test('CWUser X LIMIT 10',
+                   [('OneFetchStep', [('Any X LIMIT 10 WHERE X is CWUser', [{'X': 'CWUser'}])],
                      10, None, [self.ldap, self.system], {}, [])])
 
     def test_simple_system_ldap_limit_offset(self):
-        """retrieve EUser X from both sources and return concatenation of results
+        """retrieve CWUser X from both sources and return concatenation of results
         """
-        self._test('EUser X LIMIT 10 OFFSET 10',
-                   [('OneFetchStep', [('Any X LIMIT 10 OFFSET 10 WHERE X is EUser', [{'X': 'EUser'}])],
+        self._test('CWUser X LIMIT 10 OFFSET 10',
+                   [('OneFetchStep', [('Any X LIMIT 10 OFFSET 10 WHERE X is CWUser', [{'X': 'CWUser'}])],
                      10, 10, [self.ldap, self.system], {}, [])])
 
     def test_simple_system_ldap_ordered_limit_offset(self):
-        """retrieve EUser X from both sources and return concatenation of results
+        """retrieve CWUser X from both sources and return concatenation of results
         """
-        self._test('EUser X ORDERBY X LIMIT 10 OFFSET 10',
+        self._test('CWUser X ORDERBY X LIMIT 10 OFFSET 10',
                    [('AggrStep', 'Any X ORDERBY X', 10, 10, 'table0', None, [
-                       ('FetchStep', [('Any X WHERE X is EUser', [{'X': 'EUser'}])],
+                       ('FetchStep', [('Any X WHERE X is CWUser', [{'X': 'CWUser'}])],
                         [self.ldap, self.system], {}, {'X': 'table0.C0'}, []),
                        ]),
                    ])
     def test_simple_system_ldap_aggregat(self):
-        """retrieve EUser X from both sources and return concatenation of results
+        """retrieve CWUser X from both sources and return concatenation of results
         """
         # COUNT(X) is kept in sub-step and transformed into SUM(X) in the AggrStep
-        self._test('Any COUNT(X) WHERE X is EUser',
+        self._test('Any COUNT(X) WHERE X is CWUser',
                    [('AggrStep', 'Any COUNT(X)', None, None, 'table0', None, [
-                       ('FetchStep', [('Any COUNT(X) WHERE X is EUser', [{'X': 'EUser'}])],
+                       ('FetchStep', [('Any COUNT(X) WHERE X is CWUser', [{'X': 'CWUser'}])],
                         [self.ldap, self.system], {}, {'COUNT(X)': 'table0.C0'}, []),
                        ]),
                    ])
@@ -437,16 +437,16 @@
                      None, None, [self.rql, self.system], {}, [])])
         
     def test_simple_eid_specified(self):
-        """retrieve EUser X from system source (eid is specified, can locate the entity)
+        """retrieve CWUser X from system source (eid is specified, can locate the entity)
         """
         ueid = self.session.user.eid
         self._test('Any X,L WHERE X eid %(x)s, X login L',
-                   [('OneFetchStep', [('Any X,L WHERE X eid %s, X login L'%ueid, [{'X': 'EUser', 'L': 'String'}])],
+                   [('OneFetchStep', [('Any X,L WHERE X eid %s, X login L'%ueid, [{'X': 'CWUser', 'L': 'String'}])],
                      None, None, [self.system], {}, [])],
                    {'x': ueid})
         
     def test_simple_eid_invariant(self):
-        """retrieve EUser X from system source (eid is specified, can locate the entity)
+        """retrieve CWUser X from system source (eid is specified, can locate the entity)
         """
         ueid = self.session.user.eid
         self._test('Any X WHERE X eid %(x)s',
@@ -455,43 +455,43 @@
                    {'x': ueid})
         
     def test_simple_invariant(self):
-        """retrieve EUser X from system source only (X is invariant and in_group not supported by ldap source)
+        """retrieve CWUser X from system source only (X is invariant and in_group not supported by ldap source)
         """
-        self._test('Any X WHERE X is EUser, X in_group G, G name "users"',
-                   [('OneFetchStep', [('Any X WHERE X is EUser, X in_group G, G name "users"',
-                                       [{'X': 'EUser', 'G': 'EGroup'}])],
+        self._test('Any X WHERE X is CWUser, X in_group G, G name "users"',
+                   [('OneFetchStep', [('Any X WHERE X is CWUser, X in_group G, G name "users"',
+                                       [{'X': 'CWUser', 'G': 'CWGroup'}])],
                      None, None, [self.system], {}, [])])
         
     def test_complex_base(self):
         """
-        1. retrieve Any X, L WHERE X is EUser, X login L from system and ldap sources, store
+        1. retrieve Any X, L WHERE X is CWUser, X login L from system and ldap sources, store
            concatenation of results into a temporary table
         2. return the result of Any X, L WHERE X is TMP, X login LX in_group G,
            G name 'users' on the system source
         """
-        self._test('Any X,L WHERE X is EUser, X in_group G, X login L, G name "users"',
-                   [('FetchStep', [('Any X,L WHERE X login L, X is EUser', [{'X': 'EUser', 'L': 'String'}])],
+        self._test('Any X,L WHERE X is CWUser, X in_group G, X login L, G name "users"',
+                   [('FetchStep', [('Any X,L WHERE X login L, X is CWUser', [{'X': 'CWUser', 'L': 'String'}])],
                      [self.ldap, self.system], None,
                      {'X': 'table0.C0', 'X.login': 'table0.C1', 'L': 'table0.C1'}, []),
-                    ('OneFetchStep', [('Any X,L WHERE X in_group G, X login L, G name "users", G is EGroup, X is EUser',
-                                       [{'X': 'EUser', 'L': 'String', 'G': 'EGroup'}])],
+                    ('OneFetchStep', [('Any X,L WHERE X in_group G, X login L, G name "users", G is CWGroup, X is CWUser',
+                                       [{'X': 'CWUser', 'L': 'String', 'G': 'CWGroup'}])],
                      None, None, [self.system],
                      {'X': 'table0.C0', 'X.login': 'table0.C1', 'L': 'table0.C1'}, [])
                     ])
 
     def test_complex_base_limit_offset(self):
         """
-        1. retrieve Any X, L WHERE X is EUser, X login L from system and ldap sources, store
+        1. retrieve Any X, L WHERE X is CWUser, X login L from system and ldap sources, store
            concatenation of results into a temporary table
         2. return the result of Any X, L WHERE X is TMP, X login LX in_group G,
            G name 'users' on the system source
         """
-        self._test('Any X,L LIMIT 10 OFFSET 10 WHERE X is EUser, X in_group G, X login L, G name "users"',
-                   [('FetchStep', [('Any X,L WHERE X login L, X is EUser', [{'X': 'EUser', 'L': 'String'}])],
+        self._test('Any X,L LIMIT 10 OFFSET 10 WHERE X is CWUser, X in_group G, X login L, G name "users"',
+                   [('FetchStep', [('Any X,L WHERE X login L, X is CWUser', [{'X': 'CWUser', 'L': 'String'}])],
                      [self.ldap, self.system], None,
                      {'X': 'table0.C0', 'X.login': 'table0.C1', 'L': 'table0.C1'}, []),
-                    ('OneFetchStep', [('Any X,L LIMIT 10 OFFSET 10 WHERE X in_group G, X login L, G name "users", G is EGroup, X is EUser',
-                                       [{'X': 'EUser', 'L': 'String', 'G': 'EGroup'}])],
+                    ('OneFetchStep', [('Any X,L LIMIT 10 OFFSET 10 WHERE X in_group G, X login L, G name "users", G is CWGroup, X is CWUser',
+                                       [{'X': 'CWUser', 'L': 'String', 'G': 'CWGroup'}])],
                      10, 10,
                      [self.system], {'X': 'table0.C0', 'X.login': 'table0.C1', 'L': 'table0.C1'}, [])
                     ])
@@ -499,8 +499,8 @@
     def test_complex_ordered(self):
         self._test('Any L ORDERBY L WHERE X login L',
                    [('AggrStep', 'Any L ORDERBY L', None, None, 'table0', None, 
-                     [('FetchStep', [('Any L WHERE X login L, X is EUser',
-                                      [{'X': 'EUser', 'L': 'String'}])],
+                     [('FetchStep', [('Any L WHERE X login L, X is CWUser',
+                                      [{'X': 'CWUser', 'L': 'String'}])],
                        [self.ldap, self.system], {}, {'X.login': 'table0.C0', 'L': 'table0.C0'}, []),
                       ])
                     ])
@@ -508,8 +508,8 @@
     def test_complex_ordered_limit_offset(self):
         self._test('Any L ORDERBY L LIMIT 10 OFFSET 10 WHERE X login L',
                    [('AggrStep', 'Any L ORDERBY L', 10, 10, 'table0', None, 
-                     [('FetchStep', [('Any L WHERE X login L, X is EUser',
-                                      [{'X': 'EUser', 'L': 'String'}])],
+                     [('FetchStep', [('Any L WHERE X login L, X is CWUser',
+                                      [{'X': 'CWUser', 'L': 'String'}])],
                        [self.ldap, self.system], {}, {'X.login': 'table0.C0', 'L': 'table0.C0'}, []),
                       ])
                     ])
@@ -526,13 +526,13 @@
         ueid = self.session.user.eid
         self._test('Any X,AA ORDERBY AA WHERE E eid %(x)s, E owned_by X, X modification_date AA',
                    [('FetchStep',
-                     [('Any X,AA WHERE X modification_date AA, X is EUser',
-                       [{'AA': 'Datetime', 'X': 'EUser'}])],
+                     [('Any X,AA WHERE X modification_date AA, X is CWUser',
+                       [{'AA': 'Datetime', 'X': 'CWUser'}])],
                      [self.ldap, self.system], None,
                      {'AA': 'table0.C1', 'X': 'table0.C0', 'X.modification_date': 'table0.C1'}, []),
                     ('OneFetchStep',
-                     [('Any X,AA ORDERBY AA WHERE 5 owned_by X, X modification_date AA, X is EUser',
-                       [{'AA': 'Datetime', 'X': 'EUser'}])],
+                     [('Any X,AA ORDERBY AA WHERE 5 owned_by X, X modification_date AA, X is CWUser',
+                       [{'AA': 'Datetime', 'X': 'CWUser'}])],
                      None, None, [self.system],
                      {'AA': 'table0.C1', 'X': 'table0.C0', 'X.modification_date': 'table0.C1'}, []),
                     ],
@@ -547,23 +547,23 @@
         """
         ueid = self.session.user.eid
         self._test('Any X,L,AA WHERE E eid %(x)s, E owned_by X, X login L, X modification_date AA',
-                   [('FetchStep', [('Any X,L,AA WHERE X login L, X modification_date AA, X is EUser',
-                                    [{'AA': 'Datetime', 'X': 'EUser', 'L': 'String'}])],
+                   [('FetchStep', [('Any X,L,AA WHERE X login L, X modification_date AA, X is CWUser',
+                                    [{'AA': 'Datetime', 'X': 'CWUser', 'L': 'String'}])],
                      [self.ldap, self.system], None,
                      {'AA': 'table0.C2', 'X': 'table0.C0', 'X.login': 'table0.C1', 'X.modification_date': 'table0.C2', 'L': 'table0.C1'}, []),
-                    ('OneFetchStep', [('Any X,L,AA WHERE %s owned_by X, X login L, X modification_date AA, X is EUser'%ueid,
-                                       [{'AA': 'Datetime', 'X': 'EUser', 'L': 'String'}])],
+                    ('OneFetchStep', [('Any X,L,AA WHERE %s owned_by X, X login L, X modification_date AA, X is CWUser'%ueid,
+                                       [{'AA': 'Datetime', 'X': 'CWUser', 'L': 'String'}])],
                      None, None, [self.system],
                      {'AA': 'table0.C2', 'X': 'table0.C0', 'X.login': 'table0.C1', 'X.modification_date': 'table0.C2', 'L': 'table0.C1'}, [])],
                    {'x': ueid})
 
     def test_complex_ambigous(self):
-        """retrieve EUser X from system and ldap sources, Person X from system source only
+        """retrieve CWUser X from system and ldap sources, Person X from system source only
         """
         self._test('Any X,F WHERE X firstname F',
                    [('UnionStep', None, None, [
-                       ('OneFetchStep', [('Any X,F WHERE X firstname F, X is EUser',
-                                          [{'X': 'EUser', 'F': 'String'}])],
+                       ('OneFetchStep', [('Any X,F WHERE X firstname F, X is CWUser',
+                                          [{'X': 'CWUser', 'F': 'String'}])],
                         None, None, [self.ldap, self.system], {}, []),
                        ('OneFetchStep', [('Any X,F WHERE X firstname F, X is Personne',
                                           [{'X': 'Personne', 'F': 'String'}])],
@@ -572,12 +572,12 @@
                     ])
 
     def test_complex_ambigous_limit_offset(self):
-        """retrieve EUser X from system and ldap sources, Person X from system source only
+        """retrieve CWUser X from system and ldap sources, Person X from system source only
         """
         self._test('Any X,F LIMIT 10 OFFSET 10 WHERE X firstname F',
                    [('UnionStep', 10, 10, [
-                       ('OneFetchStep', [('Any X,F WHERE X firstname F, X is EUser',
-                                          [{'X': 'EUser', 'F': 'String'}])],
+                       ('OneFetchStep', [('Any X,F WHERE X firstname F, X is CWUser',
+                                          [{'X': 'CWUser', 'F': 'String'}])],
                         None, None,
                         [self.ldap, self.system], {}, []),
                        ('OneFetchStep', [('Any X,F WHERE X firstname F, X is Personne',
@@ -588,14 +588,14 @@
 
     def test_complex_ambigous_ordered(self):
         """
-        1. retrieve EUser X from system and ldap sources, Person X from system source only, store
+        1. retrieve CWUser X from system and ldap sources, Person X from system source only, store
            each result in the same temp table
         2. return content of the table sorted
         """
         self._test('Any X,F ORDERBY F WHERE X firstname F',
                    [('AggrStep', 'Any X,F ORDERBY F', None, None, 'table0', None, 
-                     [('FetchStep', [('Any X,F WHERE X firstname F, X is EUser',
-                                      [{'X': 'EUser', 'F': 'String'}])],
+                     [('FetchStep', [('Any X,F WHERE X firstname F, X is CWUser',
+                                      [{'X': 'CWUser', 'F': 'String'}])],
                        [self.ldap, self.system], {},
                        {'X': 'table0.C0', 'X.firstname': 'table0.C1', 'F': 'table0.C1'}, []),
                       ('FetchStep', [('Any X,F WHERE X firstname F, X is Personne',
@@ -615,15 +615,15 @@
         ueid = self.session.user.eid
         self._test('Any X,Y WHERE X login "syt", Y login "adim"',
                    [('FetchStep',
-                     [('Any X WHERE X login "syt", X is EUser', [{'X': 'EUser'}])],
+                     [('Any X WHERE X login "syt", X is CWUser', [{'X': 'CWUser'}])],
                      [self.ldap, self.system], None,
                      {'X': 'table0.C0'}, []),
                     ('FetchStep',
-                     [('Any Y WHERE Y login "adim", Y is EUser', [{'Y': 'EUser'}])],
+                     [('Any Y WHERE Y login "adim", Y is CWUser', [{'Y': 'CWUser'}])],
                      [self.ldap, self.system], None,
                      {'Y': 'table1.C0'}, []),
                     ('OneFetchStep',
-                     [('Any X,Y WHERE X is EUser, Y is EUser', [{'X': 'EUser', 'Y': 'EUser'}])],
+                     [('Any X,Y WHERE X is CWUser, Y is CWUser', [{'X': 'CWUser', 'Y': 'CWUser'}])],
                      None, None, [self.system],
                      {'X': 'table0.C0', 'Y': 'table1.C0'}, [])
                     ], {'x': ueid})
@@ -638,13 +638,13 @@
         ueid = self.session.user.eid
         self._test('Any X,Y LIMIT 10 OFFSET 10 WHERE X login "syt", Y login "adim"',
                    [('FetchStep',
-                     [('Any X WHERE X login "syt", X is EUser', [{'X': 'EUser'}])],
+                     [('Any X WHERE X login "syt", X is CWUser', [{'X': 'CWUser'}])],
                      [self.ldap, self.system], None, {'X': 'table0.C0'}, []),
                     ('FetchStep',
-                     [('Any Y WHERE Y login "adim", Y is EUser', [{'Y': 'EUser'}])],
+                     [('Any Y WHERE Y login "adim", Y is CWUser', [{'Y': 'CWUser'}])],
                      [self.ldap, self.system], None, {'Y': 'table1.C0'}, []),
                     ('OneFetchStep',
-                     [('Any X,Y LIMIT 10 OFFSET 10 WHERE X is EUser, Y is EUser', [{'X': 'EUser', 'Y': 'EUser'}])],
+                     [('Any X,Y LIMIT 10 OFFSET 10 WHERE X is CWUser, Y is CWUser', [{'X': 'CWUser', 'Y': 'CWUser'}])],
                      10, 10, [self.system],
                      {'X': 'table0.C0', 'Y': 'table1.C0'}, [])
                     ], {'x': ueid})
@@ -683,7 +683,7 @@
         ueid = self.session.user.eid
         self._test('Any U WHERE WF wf_info_for X, X eid %(x)s, WF owned_by U?, WF from_state FS',
                    [('OneFetchStep', [('Any U WHERE WF wf_info_for 5, WF owned_by U?, WF from_state FS',
-                                       [{'WF': 'TrInfo', 'FS': 'State', 'U': 'EUser'}])],
+                                       [{'WF': 'TrInfo', 'FS': 'State', 'U': 'CWUser'}])],
                      None, None, [self.system], {}, [])],
                    {'x': ueid})
 
@@ -691,7 +691,7 @@
         ueid = self.session.user.eid
         self._test('Any U WHERE WF wf_info_for X, X eid %(x)s, WF owned_by U?, WF from_state FS',
                    [('OneFetchStep', [('Any U WHERE WF wf_info_for 5, WF owned_by U?, WF from_state FS',
-                                       [{'WF': 'TrInfo', 'FS': 'State', 'U': 'EUser'}])],
+                                       [{'WF': 'TrInfo', 'FS': 'State', 'U': 'CWUser'}])],
                      None, None, [self.system], {}, [])],
                    {'x': ueid})
 
@@ -701,16 +701,16 @@
                    [('FetchStep', [('Any X,T WHERE X title T, X is Card', [{'X': 'Card', 'T': 'String'}])],
                      [self.rql, self.system], None,
                      {'T': 'table0.C1', 'X': 'table0.C0', 'X.title': 'table0.C1'}, []),
-                    ('FetchStep', [('Any U WHERE U login "syt", U is EUser', [{'U': 'EUser'}])],
+                    ('FetchStep', [('Any U WHERE U login "syt", U is CWUser', [{'U': 'CWUser'}])],
                      [self.ldap, self.system], None,
                      {'U': 'table1.C0'}, []),
                     ('UnionStep', None, None, [
-                        ('OneFetchStep', [('Any X,T WHERE X owned_by U, X title T, U is EUser, X is IN(Bookmark, EmailThread)',
-                                           [{'T': 'String', 'U': 'EUser', 'X': 'Bookmark'},
-                                            {'T': 'String', 'U': 'EUser', 'X': 'EmailThread'}])],
+                        ('OneFetchStep', [('Any X,T WHERE X owned_by U, X title T, U is CWUser, X is IN(Bookmark, EmailThread)',
+                                           [{'T': 'String', 'U': 'CWUser', 'X': 'Bookmark'},
+                                            {'T': 'String', 'U': 'CWUser', 'X': 'EmailThread'}])],
                          None, None, [self.system], {'U': 'table1.C0'}, []),
-                        ('OneFetchStep', [('Any X,T WHERE X owned_by U, X title T, U is EUser, X is Card',
-                                           [{'X': 'Card', 'U': 'EUser', 'T': 'String'}])],
+                        ('OneFetchStep', [('Any X,T WHERE X owned_by U, X title T, U is CWUser, X is Card',
+                                           [{'X': 'Card', 'U': 'CWUser', 'T': 'String'}])],
                          None, None, [self.system],
                          {'X': 'table0.C0', 'X.title': 'table0.C1', 'T': 'table0.C1', 'U': 'table1.C0'}, []),
                         ]),
@@ -749,7 +749,7 @@
         # both system and rql support all variables, can be 
         self._test('Any X WHERE NOT X identity U, U eid %s' % self.session.user.eid,
                    [('OneFetchStep',
-                     [('Any X WHERE NOT X identity 5, X is EUser', [{'X': 'EUser'}])],
+                     [('Any X WHERE NOT X identity 5, X is CWUser', [{'X': 'CWUser'}])],
                      None, None,
                      [self.ldap, self.system], {}, [])
                     ])
@@ -761,11 +761,11 @@
                                     [{'Y': 'Note', 'A': 'State', 'R': 'String'}])],
                      [self.rql, self.system], None,
                      {'A': 'table0.C0', 'R': 'table0.C1', 'Y.type': 'table0.C1'}, []),
-                    ('FetchStep', [('Any X,R WHERE X login R, X is EUser', [{'X': 'EUser', 'R': 'String'}])],
+                    ('FetchStep', [('Any X,R WHERE X login R, X is CWUser', [{'X': 'CWUser', 'R': 'String'}])],
                      [self.ldap, self.system], None,
                      {'X': 'table1.C0', 'X.login': 'table1.C1', 'R': 'table1.C1'}, []),
-                    ('OneFetchStep', [('Any X,MAX(R) GROUPBY X WHERE X in_state S, X login R, NOT EXISTS(Y type R, S identity A, A is State, Y is Note), S is State, X is EUser',
-                                       [{'Y': 'Note', 'X': 'EUser', 'S': 'State', 'R': 'String', 'A': 'State'}])],
+                    ('OneFetchStep', [('Any X,MAX(R) GROUPBY X WHERE X in_state S, X login R, NOT EXISTS(Y type R, S identity A, A is State, Y is Note), S is State, X is CWUser',
+                                       [{'Y': 'Note', 'X': 'CWUser', 'S': 'State', 'R': 'String', 'A': 'State'}])],
                      None, None, [self.system],
                      {'A': 'table0.C0', 'X': 'table1.C0', 'X.login': 'table1.C1', 'R': 'table1.C1', 'Y.type': 'table0.C1'}, [])
                     ])
@@ -784,8 +784,8 @@
                       ('OneFetchStep',
                        [('Any X WHERE X has_text "bla", EXISTS(X owned_by 5), X is Basket',
                          [{'X': 'Basket'}]),
-                        ('Any X WHERE X has_text "bla", EXISTS(X owned_by 5), X is EUser',
-                         [{'X': 'EUser'}]),
+                        ('Any X WHERE X has_text "bla", EXISTS(X owned_by 5), X is CWUser',
+                         [{'X': 'CWUser'}]),
                         ('Any X WHERE X has_text "bla", X is IN(Card, Comment, Division, Email, EmailThread, File, Folder, Image, Note, Personne, Societe, State, SubDivision, Tag, Transition)',
                          [{'X': 'Card'}, {'X': 'Comment'}, {'X': 'Division'},
                           {'X': 'Email'}, {'X': 'EmailThread'}, {'X': 'File'},
@@ -810,8 +810,8 @@
                          ('FetchStep',
                           [('Any X WHERE X has_text "bla", EXISTS(X owned_by 5), X is Basket',
                          [{'X': 'Basket'}]),
-                        ('Any X WHERE X has_text "bla", EXISTS(X owned_by 5), X is EUser',
-                         [{'X': 'EUser'}]),
+                        ('Any X WHERE X has_text "bla", EXISTS(X owned_by 5), X is CWUser',
+                         [{'X': 'CWUser'}]),
                         ('Any X WHERE X has_text "bla", X is IN(Card, Comment, Division, Email, EmailThread, File, Folder, Image, Note, Personne, Societe, State, SubDivision, Tag, Transition)',
                          [{'X': 'Card'}, {'X': 'Comment'}, {'X': 'Division'},
                           {'X': 'Email'}, {'X': 'EmailThread'}, {'X': 'File'},
@@ -823,7 +823,7 @@
                     ('OneFetchStep',
                      [('Any X LIMIT 10 OFFSET 10',
                        [{'X': 'Affaire'}, {'X': 'Basket'}, {'X': 'Card'},
-                        {'X': 'Comment'}, {'X': 'Division'}, {'X': 'EUser'},
+                        {'X': 'Comment'}, {'X': 'Division'}, {'X': 'CWUser'},
                         {'X': 'Email'}, {'X': 'EmailThread'}, {'X': 'File'},
                         {'X': 'Folder'}, {'X': 'Image'}, {'X': 'Note'},
                         {'X': 'Personne'}, {'X': 'Societe'}, {'X': 'State'},
@@ -837,20 +837,20 @@
         self.session = self._user_session()[1]
         self._test('Any X WHERE X login "bla"',
                    [('FetchStep',
-                     [('Any X WHERE X login "bla", X is EUser', [{'X': 'EUser'}])],
+                     [('Any X WHERE X login "bla", X is CWUser', [{'X': 'CWUser'}])],
                      [self.ldap, self.system], None, {'X': 'table0.C0'}, []),
                     ('OneFetchStep',
-                     [('Any X WHERE EXISTS(X owned_by 5), X is EUser', [{'X': 'EUser'}])],
+                     [('Any X WHERE EXISTS(X owned_by 5), X is CWUser', [{'X': 'CWUser'}])],
                      None, None, [self.system], {'X': 'table0.C0'}, [])])
                 
     def test_security_complex_has_text(self):
         # use a guest user
         self.session = self._user_session()[1]
         self._test('Any X WHERE X has_text "bla", X firstname "bla"',
-                   [('FetchStep', [('Any X WHERE X firstname "bla", X is EUser', [{'X': 'EUser'}])],
+                   [('FetchStep', [('Any X WHERE X firstname "bla", X is CWUser', [{'X': 'CWUser'}])],
                      [self.ldap, self.system], None, {'X': 'table0.C0'}, []),
                     ('UnionStep', None, None, [
-                        ('OneFetchStep', [('Any X WHERE X has_text "bla", EXISTS(X owned_by 5), X is EUser', [{'X': 'EUser'}])],
+                        ('OneFetchStep', [('Any X WHERE X has_text "bla", EXISTS(X owned_by 5), X is CWUser', [{'X': 'CWUser'}])],
                          None, None, [self.system], {'X': 'table0.C0'}, []),
                         ('OneFetchStep', [('Any X WHERE X has_text "bla", X firstname "bla", X is Personne', [{'X': 'Personne'}])],
                          None, None, [self.system], {}, []),
@@ -861,16 +861,16 @@
         # use a guest user
         self.session = self._user_session()[1]
         self._test('Any X LIMIT 10 OFFSET 10 WHERE X has_text "bla", X firstname "bla"',
-                   [('FetchStep', [('Any X WHERE X firstname "bla", X is EUser', [{'X': 'EUser'}])],
+                   [('FetchStep', [('Any X WHERE X firstname "bla", X is CWUser', [{'X': 'CWUser'}])],
                      [self.ldap, self.system], None, {'X': 'table1.C0'}, []),
                     ('UnionFetchStep', [
-                        ('FetchStep', [('Any X WHERE X has_text "bla", EXISTS(X owned_by 5), X is EUser', [{'X': 'EUser'}])],
+                        ('FetchStep', [('Any X WHERE X has_text "bla", EXISTS(X owned_by 5), X is CWUser', [{'X': 'CWUser'}])],
                          [self.system], {'X': 'table1.C0'}, {'X': 'table0.C0'}, []),
                         ('FetchStep', [('Any X WHERE X has_text "bla", X firstname "bla", X is Personne', [{'X': 'Personne'}])],
                          [self.system], {}, {'X': 'table0.C0'}, []),
                         ]),
                      ('OneFetchStep',
-                      [('Any X LIMIT 10 OFFSET 10', [{'X': 'EUser'}, {'X': 'Personne'}])],
+                      [('Any X LIMIT 10 OFFSET 10', [{'X': 'CWUser'}, {'X': 'Personne'}])],
                       10, 10, [self.system], {'X': 'table0.C0'}, [])
                     ])
 
@@ -880,7 +880,7 @@
         self._test('Any MAX(X)',
                    [('FetchStep', [('Any E WHERE E type "X", E is Note', [{'E': 'Note'}])],
                      [self.rql, self.system],  None, {'E': 'table1.C0'}, []), 
-                    ('FetchStep', [('Any X WHERE X is EUser', [{'X': 'EUser'}])],
+                    ('FetchStep', [('Any X WHERE X is CWUser', [{'X': 'CWUser'}])],
                      [self.ldap, self.system], None, {'X': 'table2.C0'}, []),
                     ('UnionFetchStep', [
                         ('FetchStep', [('Any X WHERE EXISTS(X owned_by 5), X is Basket', [{'X': 'Basket'}])],
@@ -890,19 +890,19 @@
                                           [{'X': 'Card'}, {'X': 'Note'}, {'X': 'State'}])],
                            [self.rql, self.system], {}, {'X': 'table0.C0'}, []),
                           ('FetchStep',
-                           [('Any X WHERE X is IN(Bookmark, Comment, Division, ECache, EConstraint, EConstraintType, EEType, EFRDef, EGroup, ENFRDef, EPermission, EProperty, ERType, Email, EmailAddress, EmailPart, EmailThread, File, Folder, Image, Personne, RQLExpression, Societe, SubDivision, Tag, TrInfo, Transition)',
+                           [('Any X WHERE X is IN(Bookmark, Comment, Division, CWCache, CWConstraint, CWConstraintType, CWEType, CWAttribute, CWGroup, CWRelation, CWPermission, CWProperty, CWRType, Email, EmailAddress, EmailPart, EmailThread, File, Folder, Image, Personne, RQLExpression, Societe, SubDivision, Tag, TrInfo, Transition)',
                              sorted([{'X': 'Bookmark'}, {'X': 'Comment'}, {'X': 'Division'},
-                                      {'X': 'ECache'}, {'X': 'EConstraint'}, {'X': 'EConstraintType'},
-                                      {'X': 'EEType'}, {'X': 'EFRDef'}, {'X': 'EGroup'},
-                                      {'X': 'ENFRDef'}, {'X': 'EPermission'}, {'X': 'EProperty'},
-                                      {'X': 'ERType'}, {'X': 'Email'}, {'X': 'EmailAddress'},
+                                      {'X': 'CWCache'}, {'X': 'CWConstraint'}, {'X': 'CWConstraintType'},
+                                      {'X': 'CWEType'}, {'X': 'CWAttribute'}, {'X': 'CWGroup'},
+                                      {'X': 'CWRelation'}, {'X': 'CWPermission'}, {'X': 'CWProperty'},
+                                      {'X': 'CWRType'}, {'X': 'Email'}, {'X': 'EmailAddress'},
                                       {'X': 'EmailPart'}, {'X': 'EmailThread'}, {'X': 'File'},
                                       {'X': 'Folder'}, {'X': 'Image'}, {'X': 'Personne'},
                                       {'X': 'RQLExpression'}, {'X': 'Societe'}, {'X': 'SubDivision'},
                                       {'X': 'Tag'}, {'X': 'TrInfo'}, {'X': 'Transition'}]))],
                            [self.system], {}, {'X': 'table0.C0'}, []),
                           ]),
-                        ('FetchStep', [('Any X WHERE EXISTS(X owned_by 5), X is EUser', [{'X': 'EUser'}])],
+                        ('FetchStep', [('Any X WHERE EXISTS(X owned_by 5), X is CWUser', [{'X': 'CWUser'}])],
                          [self.system], {'X': 'table2.C0'}, {'X': 'table0.C0'}, []),
                         ('FetchStep', [('Any X WHERE (EXISTS(X owned_by 5)) OR ((((EXISTS(D concerne C?, C owned_by 5, C type "X", X identity D, C is Division, D is Affaire)) OR (EXISTS(H concerne G?, G owned_by 5, G type "X", X identity H, G is SubDivision, H is Affaire))) OR (EXISTS(I concerne F?, F owned_by 5, F type "X", X identity I, F is Societe, I is Affaire))) OR (EXISTS(J concerne E?, E owned_by 5, X identity J, E is Note, J is Affaire))), X is Affaire',
                                         [{'C': 'Division', 'E': 'Note', 'D': 'Affaire', 'G': 'SubDivision', 'F': 'Societe', 'I': 'Affaire', 'H': 'Affaire', 'J': 'Affaire', 'X': 'Affaire'}])],
@@ -921,67 +921,67 @@
                      [self.rql, self.system], None, {'X': 'table1.C0'}, []),
                     ('FetchStep', [('Any E WHERE E type "X", E is Note', [{'E': 'Note'}])],
                      [self.rql, self.system],  None, {'E': 'table2.C0'}, []),
-                    ('FetchStep', [('Any X WHERE X is EUser', [{'X': 'EUser'}])],
+                    ('FetchStep', [('Any X WHERE X is CWUser', [{'X': 'CWUser'}])],
                      [self.ldap, self.system], None, {'X': 'table3.C0'}, []),
                     ('UnionFetchStep',
-                     [('FetchStep', [('Any ET,X WHERE X is ET, EXISTS(X owned_by 5), ET is EEType, X is Basket',
-                                      [{'ET': 'EEType', 'X': 'Basket'}])],
+                     [('FetchStep', [('Any ET,X WHERE X is ET, EXISTS(X owned_by 5), ET is CWEType, X is Basket',
+                                      [{'ET': 'CWEType', 'X': 'Basket'}])],
                        [self.system], {}, {'ET': 'table0.C0', 'X': 'table0.C1'}, []),
-                      ('FetchStep', [('Any ET,X WHERE X is ET, (EXISTS(X owned_by 5)) OR ((((EXISTS(D concerne C?, C owned_by 5, C type "X", X identity D, C is Division, D is Affaire)) OR (EXISTS(H concerne G?, G owned_by 5, G type "X", X identity H, G is SubDivision, H is Affaire))) OR (EXISTS(I concerne F?, F owned_by 5, F type "X", X identity I, F is Societe, I is Affaire))) OR (EXISTS(J concerne E?, E owned_by 5, X identity J, E is Note, J is Affaire))), ET is EEType, X is Affaire',
+                      ('FetchStep', [('Any ET,X WHERE X is ET, (EXISTS(X owned_by 5)) OR ((((EXISTS(D concerne C?, C owned_by 5, C type "X", X identity D, C is Division, D is Affaire)) OR (EXISTS(H concerne G?, G owned_by 5, G type "X", X identity H, G is SubDivision, H is Affaire))) OR (EXISTS(I concerne F?, F owned_by 5, F type "X", X identity I, F is Societe, I is Affaire))) OR (EXISTS(J concerne E?, E owned_by 5, X identity J, E is Note, J is Affaire))), ET is CWEType, X is Affaire',
                                       [{'C': 'Division', 'E': 'Note', 'D': 'Affaire',
                                         'G': 'SubDivision', 'F': 'Societe', 'I': 'Affaire',
                                         'H': 'Affaire', 'J': 'Affaire', 'X': 'Affaire',
-                                        'ET': 'EEType'}])],
+                                        'ET': 'CWEType'}])],
                        [self.system], {'E': 'table2.C0'}, {'ET': 'table0.C0', 'X': 'table0.C1'},
                        []),
-                      ('FetchStep', [('Any ET,X WHERE X is ET, EXISTS(X owned_by 5), ET is EEType, X is EUser',
-                                      [{'ET': 'EEType', 'X': 'EUser'}])],
+                      ('FetchStep', [('Any ET,X WHERE X is ET, EXISTS(X owned_by 5), ET is CWEType, X is CWUser',
+                                      [{'ET': 'CWEType', 'X': 'CWUser'}])],
                        [self.system], {'X': 'table3.C0'}, {'ET': 'table0.C0', 'X': 'table0.C1'}, []),
                       # extra UnionFetchStep could be avoided but has no cost, so don't care
                       ('UnionFetchStep',
-                       [('FetchStep', [('Any ET,X WHERE X is ET, ET is EEType, X is IN(Bookmark, Comment, Division, ECache, EConstraint, EConstraintType, EEType, EFRDef, EGroup, ENFRDef, EPermission, EProperty, ERType, Email, EmailAddress, EmailPart, EmailThread, File, Folder, Image, Personne, RQLExpression, Societe, SubDivision, Tag, TrInfo, Transition)',
-                                        [{'X': 'Bookmark', 'ET': 'EEType'}, {'X': 'Comment', 'ET': 'EEType'},
-                                         {'X': 'Division', 'ET': 'EEType'}, {'X': 'ECache', 'ET': 'EEType'},
-                                         {'X': 'EConstraint', 'ET': 'EEType'}, {'X': 'EConstraintType', 'ET': 'EEType'},
-                                         {'X': 'EEType', 'ET': 'EEType'}, {'X': 'EFRDef', 'ET': 'EEType'},
-                                         {'X': 'EGroup', 'ET': 'EEType'}, {'X': 'ENFRDef', 'ET': 'EEType'},
-                                         {'X': 'EPermission', 'ET': 'EEType'}, {'X': 'EProperty', 'ET': 'EEType'},
-                                         {'X': 'ERType', 'ET': 'EEType'}, {'X': 'Email', 'ET': 'EEType'},
-                                         {'X': 'EmailAddress', 'ET': 'EEType'}, {'X': 'EmailPart', 'ET': 'EEType'},
-                                         {'X': 'EmailThread', 'ET': 'EEType'}, {'X': 'File', 'ET': 'EEType'},
-                                         {'X': 'Folder', 'ET': 'EEType'}, {'X': 'Image', 'ET': 'EEType'},
-                                         {'X': 'Personne', 'ET': 'EEType'}, {'X': 'RQLExpression', 'ET': 'EEType'},
-                                         {'X': 'Societe', 'ET': 'EEType'}, {'X': 'SubDivision', 'ET': 'EEType'},
-                                         {'X': 'Tag', 'ET': 'EEType'}, {'X': 'TrInfo', 'ET': 'EEType'},
-                                         {'X': 'Transition', 'ET': 'EEType'}])],
+                       [('FetchStep', [('Any ET,X WHERE X is ET, ET is CWEType, X is IN(Bookmark, Comment, Division, CWCache, CWConstraint, CWConstraintType, CWEType, CWAttribute, CWGroup, CWRelation, CWPermission, CWProperty, CWRType, Email, EmailAddress, EmailPart, EmailThread, File, Folder, Image, Personne, RQLExpression, Societe, SubDivision, Tag, TrInfo, Transition)',
+                                        [{'X': 'Bookmark', 'ET': 'CWEType'}, {'X': 'Comment', 'ET': 'CWEType'},
+                                         {'X': 'Division', 'ET': 'CWEType'}, {'X': 'CWCache', 'ET': 'CWEType'},
+                                         {'X': 'CWConstraint', 'ET': 'CWEType'}, {'X': 'CWConstraintType', 'ET': 'CWEType'},
+                                         {'X': 'CWEType', 'ET': 'CWEType'}, {'X': 'CWAttribute', 'ET': 'CWEType'},
+                                         {'X': 'CWGroup', 'ET': 'CWEType'}, {'X': 'CWRelation', 'ET': 'CWEType'},
+                                         {'X': 'CWPermission', 'ET': 'CWEType'}, {'X': 'CWProperty', 'ET': 'CWEType'},
+                                         {'X': 'CWRType', 'ET': 'CWEType'}, {'X': 'Email', 'ET': 'CWEType'},
+                                         {'X': 'EmailAddress', 'ET': 'CWEType'}, {'X': 'EmailPart', 'ET': 'CWEType'},
+                                         {'X': 'EmailThread', 'ET': 'CWEType'}, {'X': 'File', 'ET': 'CWEType'},
+                                         {'X': 'Folder', 'ET': 'CWEType'}, {'X': 'Image', 'ET': 'CWEType'},
+                                         {'X': 'Personne', 'ET': 'CWEType'}, {'X': 'RQLExpression', 'ET': 'CWEType'},
+                                         {'X': 'Societe', 'ET': 'CWEType'}, {'X': 'SubDivision', 'ET': 'CWEType'},
+                                         {'X': 'Tag', 'ET': 'CWEType'}, {'X': 'TrInfo', 'ET': 'CWEType'},
+                                         {'X': 'Transition', 'ET': 'CWEType'}])],
                          [self.system], {}, {'ET': 'table0.C0', 'X': 'table0.C1'}, []),
                         ('FetchStep',
-                         [('Any ET,X WHERE X is ET, ET is EEType, X is IN(Card, Note, State)',
-                           [{'ET': 'EEType', 'X': 'Card'},
-                            {'ET': 'EEType', 'X': 'Note'},
-                            {'ET': 'EEType', 'X': 'State'}])],
+                         [('Any ET,X WHERE X is ET, ET is CWEType, X is IN(Card, Note, State)',
+                           [{'ET': 'CWEType', 'X': 'Card'},
+                            {'ET': 'CWEType', 'X': 'Note'},
+                            {'ET': 'CWEType', 'X': 'State'}])],
                          [self.system], {'X': 'table1.C0'}, {'ET': 'table0.C0', 'X': 'table0.C1'}, []),
                         ]),
                     ]),
                     ('OneFetchStep',
                      [('Any ET,COUNT(X) GROUPBY ET ORDERBY ET',
-                       sorted([{'ET': 'EEType', 'X': 'Affaire'}, {'ET': 'EEType', 'X': 'Basket'},
-                               {'ET': 'EEType', 'X': 'Bookmark'}, {'ET': 'EEType', 'X': 'Card'},
-                               {'ET': 'EEType', 'X': 'Comment'}, {'ET': 'EEType', 'X': 'Division'},
-                               {'ET': 'EEType', 'X': 'ECache'}, {'ET': 'EEType', 'X': 'EConstraint'},
-                               {'ET': 'EEType', 'X': 'EConstraintType'}, {'ET': 'EEType', 'X': 'EEType'},
-                               {'ET': 'EEType', 'X': 'EFRDef'}, {'ET': 'EEType', 'X': 'EGroup'},
-                               {'ET': 'EEType', 'X': 'ENFRDef'}, {'ET': 'EEType', 'X': 'EPermission'},
-                               {'ET': 'EEType', 'X': 'EProperty'}, {'ET': 'EEType', 'X': 'ERType'},
-                               {'ET': 'EEType', 'X': 'EUser'}, {'ET': 'EEType', 'X': 'Email'},
-                               {'ET': 'EEType', 'X': 'EmailAddress'}, {'ET': 'EEType', 'X': 'EmailPart'},
-                               {'ET': 'EEType', 'X': 'EmailThread'}, {'ET': 'EEType', 'X': 'File'},
-                               {'ET': 'EEType', 'X': 'Folder'}, {'ET': 'EEType', 'X': 'Image'},
-                               {'ET': 'EEType', 'X': 'Note'}, {'ET': 'EEType', 'X': 'Personne'},
-                               {'ET': 'EEType', 'X': 'RQLExpression'}, {'ET': 'EEType', 'X': 'Societe'},
-                               {'ET': 'EEType', 'X': 'State'}, {'ET': 'EEType', 'X': 'SubDivision'},
-                               {'ET': 'EEType', 'X': 'Tag'}, {'ET': 'EEType', 'X': 'TrInfo'},
-                               {'ET': 'EEType', 'X': 'Transition'}]))],
+                       sorted([{'ET': 'CWEType', 'X': 'Affaire'}, {'ET': 'CWEType', 'X': 'Basket'},
+                               {'ET': 'CWEType', 'X': 'Bookmark'}, {'ET': 'CWEType', 'X': 'Card'},
+                               {'ET': 'CWEType', 'X': 'Comment'}, {'ET': 'CWEType', 'X': 'Division'},
+                               {'ET': 'CWEType', 'X': 'CWCache'}, {'ET': 'CWEType', 'X': 'CWConstraint'},
+                               {'ET': 'CWEType', 'X': 'CWConstraintType'}, {'ET': 'CWEType', 'X': 'CWEType'},
+                               {'ET': 'CWEType', 'X': 'CWAttribute'}, {'ET': 'CWEType', 'X': 'CWGroup'},
+                               {'ET': 'CWEType', 'X': 'CWRelation'}, {'ET': 'CWEType', 'X': 'CWPermission'},
+                               {'ET': 'CWEType', 'X': 'CWProperty'}, {'ET': 'CWEType', 'X': 'CWRType'},
+                               {'ET': 'CWEType', 'X': 'CWUser'}, {'ET': 'CWEType', 'X': 'Email'},
+                               {'ET': 'CWEType', 'X': 'EmailAddress'}, {'ET': 'CWEType', 'X': 'EmailPart'},
+                               {'ET': 'CWEType', 'X': 'EmailThread'}, {'ET': 'CWEType', 'X': 'File'},
+                               {'ET': 'CWEType', 'X': 'Folder'}, {'ET': 'CWEType', 'X': 'Image'},
+                               {'ET': 'CWEType', 'X': 'Note'}, {'ET': 'CWEType', 'X': 'Personne'},
+                               {'ET': 'CWEType', 'X': 'RQLExpression'}, {'ET': 'CWEType', 'X': 'Societe'},
+                               {'ET': 'CWEType', 'X': 'State'}, {'ET': 'CWEType', 'X': 'SubDivision'},
+                               {'ET': 'CWEType', 'X': 'Tag'}, {'ET': 'CWEType', 'X': 'TrInfo'},
+                               {'ET': 'CWEType', 'X': 'Transition'}]))],
                      None, None, [self.system], {'ET': 'table0.C0', 'X': 'table0.C1'}, [])
                     ])
 
@@ -993,11 +993,11 @@
                      [('Any X,XT WHERE X title XT, X is Card', [{'X': 'Card', 'XT': 'String'}])],
                      [self.rql, self.system], None, {'X': 'table0.C0', 'X.title': 'table0.C1', 'XT': 'table0.C1'}, []),
                     ('FetchStep',
-                     [('Any U WHERE U login "syt", U is EUser', [{'U': 'EUser'}])],
+                     [('Any U WHERE U login "syt", U is CWUser', [{'U': 'CWUser'}])],
                      [self.ldap, self.system], None, {'U': 'table1.C0'}, []),
                     ('OneFetchStep',
-                     [('Any X,XT WHERE X owned_by U, X title XT, EXISTS(U owned_by 5), U is EUser, X is Card',
-                       [{'X': 'Card', 'U': 'EUser', 'XT': 'String'}])],
+                     [('Any X,XT WHERE X owned_by U, X title XT, EXISTS(U owned_by 5), U is CWUser, X is Card',
+                       [{'X': 'Card', 'U': 'CWUser', 'XT': 'String'}])],
                      None, None, [self.system],
                      {'X': 'table0.C0', 'X.title': 'table0.C1', 'XT': 'table0.C1', 'U': 'table1.C0'}, [])
                     ])
@@ -1011,8 +1011,8 @@
                      [('Any X,XT WHERE X title XT, X is Card', [{'X': 'Card', 'XT': 'String'}])],
                      [self.rql, self.system], None, {'X': 'table0.C0', 'X.title': 'table0.C1', 'XT': 'table0.C1'}, []),
                     ('OneFetchStep',
-                     [('Any X,XT WHERE X owned_by U, X title XT, U login "syt", EXISTS(U identity 5), U is EUser, X is Card',
-                       [{'U': 'EUser', 'X': 'Card', 'XT': 'String'}])],
+                     [('Any X,XT WHERE X owned_by U, X title XT, U login "syt", EXISTS(U identity 5), U is CWUser, X is Card',
+                       [{'U': 'CWUser', 'X': 'Card', 'XT': 'String'}])],
                      None, None, [self.system], {'X': 'table0.C0', 'X.title': 'table0.C1', 'XT': 'table0.C1'}, [])
                     ])
 
@@ -1022,8 +1022,8 @@
         self.session = self._user_session()[1]
         self._test('Any X,XT,U WHERE X is Card, X owned_by U?, X title XT, U login L',
                    [('FetchStep',
-                     [('Any U,L WHERE U identity 5, U login L, U is EUser',
-                       [{'L': 'String', u'U': 'EUser'}])],
+                     [('Any U,L WHERE U identity 5, U login L, U is CWUser',
+                       [{'L': 'String', u'U': 'CWUser'}])],
                      [self.system], {}, {'L': 'table0.C1', 'U': 'table0.C0', 'U.login': 'table0.C1'}, []),
                     ('FetchStep',
                      [('Any X,XT WHERE X title XT, X is Card', [{'X': 'Card', 'XT': 'String'}])],
@@ -1046,47 +1046,47 @@
                      [('Any X,XT WHERE X title XT, X is Card', [{'X': 'Card', 'XT': 'String'}])],
                      [self.rql, self.system], None, {'X': 'table0.C0', 'X.title': 'table0.C1', 'XT': 'table0.C1'}, []),
                     ('FetchStep',
-                     [('Any U WHERE U login "syt", U is EUser', [{'U': 'EUser'}])],
+                     [('Any U WHERE U login "syt", U is CWUser', [{'U': 'CWUser'}])],
                      [self.ldap, self.system], None, {'U': 'table1.C0'}, []),
                     ('OneFetchStep',
-                     [('Any X,XT LIMIT 10 OFFSET 10 WHERE X owned_by U, X title XT, EXISTS(U owned_by 5), U is EUser, X is Card',
-                       [{'X': 'Card', 'U': 'EUser', 'XT': 'String'}])],
+                     [('Any X,XT LIMIT 10 OFFSET 10 WHERE X owned_by U, X title XT, EXISTS(U owned_by 5), U is CWUser, X is Card',
+                       [{'X': 'Card', 'U': 'CWUser', 'XT': 'String'}])],
                      10, 10, [self.system],
                      {'X': 'table0.C0', 'X.title': 'table0.C1', 'XT': 'table0.C1', 'U': 'table1.C0'}, [])
                     ])
     
     def test_exists_base(self):
         self._test('Any X,L,S WHERE X in_state S, X login L, EXISTS(X in_group G, G name "bougloup")',
-                   [('FetchStep', [('Any X,L WHERE X login L, X is EUser', [{'X': 'EUser', 'L': 'String'}])],
+                   [('FetchStep', [('Any X,L WHERE X login L, X is CWUser', [{'X': 'CWUser', 'L': 'String'}])],
                      [self.ldap, self.system], None, {'X': 'table0.C0', 'X.login': 'table0.C1', 'L': 'table0.C1'}, []),
                     ('OneFetchStep', [("Any X,L,S WHERE X in_state S, X login L, "
-                                      'EXISTS(X in_group G, G name "bougloup", G is EGroup), S is State, X is EUser',
-                                       [{'X': 'EUser', 'L': 'String', 'S': 'State', 'G': 'EGroup'}])],
+                                      'EXISTS(X in_group G, G name "bougloup", G is CWGroup), S is State, X is CWUser',
+                                       [{'X': 'CWUser', 'L': 'String', 'S': 'State', 'G': 'CWGroup'}])],
                      None, None, [self.system],
                      {'X': 'table0.C0', 'X.login': 'table0.C1', 'L': 'table0.C1'}, [])])
 
     def test_exists_complex(self):
         self._test('Any G WHERE X in_group G, G name "managers", EXISTS(X copain T, T login in ("comme", "cochon"))',
-                   [('FetchStep', [('Any T WHERE T login IN("comme", "cochon"), T is EUser', [{'T': 'EUser'}])],
+                   [('FetchStep', [('Any T WHERE T login IN("comme", "cochon"), T is CWUser', [{'T': 'CWUser'}])],
                      [self.ldap, self.system], None, {'T': 'table0.C0'}, []),
                     ('OneFetchStep',
-                     [('Any G WHERE X in_group G, G name "managers", EXISTS(X copain T, T is EUser), G is EGroup, X is EUser',
-                       [{'X': 'EUser', 'T': 'EUser', 'G': 'EGroup'}])],
+                     [('Any G WHERE X in_group G, G name "managers", EXISTS(X copain T, T is CWUser), G is CWGroup, X is CWUser',
+                       [{'X': 'CWUser', 'T': 'CWUser', 'G': 'CWGroup'}])],
                      None, None, [self.system], {'T': 'table0.C0'}, [])])
 
     def test_exists3(self):
         self._test('Any G,L WHERE X in_group G, X login L, G name "managers", EXISTS(X copain T, T login in ("comme", "cochon"))',
                    [('FetchStep',
-                     [('Any T WHERE T login IN("comme", "cochon"), T is EUser',
-                       [{'T': 'EUser'}])],
+                     [('Any T WHERE T login IN("comme", "cochon"), T is CWUser',
+                       [{'T': 'CWUser'}])],
                      [self.ldap, self.system], None, {'T': 'table0.C0'}, []),
                     ('FetchStep',
-                     [('Any L,X WHERE X login L, X is EUser', [{'X': 'EUser', 'L': 'String'}])],
+                     [('Any L,X WHERE X login L, X is CWUser', [{'X': 'CWUser', 'L': 'String'}])],
                      [self.ldap, self.system], None,
                      {'X': 'table1.C1', 'X.login': 'table1.C0', 'L': 'table1.C0'}, []),
                     ('OneFetchStep',
-                     [('Any G,L WHERE X in_group G, X login L, G name "managers", EXISTS(X copain T, T is EUser), G is EGroup, X is EUser',
-                       [{'G': 'EGroup', 'L': 'String', 'T': 'EUser', 'X': 'EUser'}])],
+                     [('Any G,L WHERE X in_group G, X login L, G name "managers", EXISTS(X copain T, T is CWUser), G is CWGroup, X is CWUser',
+                       [{'G': 'CWGroup', 'L': 'String', 'T': 'CWUser', 'X': 'CWUser'}])],
                      None, None,
                      [self.system], {'T': 'table0.C0', 'X': 'table1.C1', 'X.login': 'table1.C0', 'L': 'table1.C0'}, [])])
 
@@ -1095,18 +1095,18 @@
                    'EXISTS(X copain T, T login L, T login in ("comme", "cochon")) OR '
                    'EXISTS(X in_state S, S name "pascontent", NOT X copain T2, T2 login "billy")',
                    [('FetchStep',
-                     [('Any T,L WHERE T login L, T login IN("comme", "cochon"), T is EUser', [{'T': 'EUser', 'L': 'String'}])],
+                     [('Any T,L WHERE T login L, T login IN("comme", "cochon"), T is CWUser', [{'T': 'CWUser', 'L': 'String'}])],
                      [self.ldap, self.system], None,
                      {'T': 'table0.C0', 'T.login': 'table0.C1', 'L': 'table0.C1'}, []),
                     ('FetchStep',
-                     [('Any T2 WHERE T2 login "billy", T2 is EUser', [{'T2': 'EUser'}])],
+                     [('Any T2 WHERE T2 login "billy", T2 is CWUser', [{'T2': 'CWUser'}])],
                      [self.ldap, self.system], None, {'T2': 'table1.C0'}, []),
                     ('FetchStep',
-                     [('Any L,X WHERE X login L, X is EUser', [{'X': 'EUser', 'L': 'String'}])],
+                     [('Any L,X WHERE X login L, X is CWUser', [{'X': 'CWUser', 'L': 'String'}])],
                      [self.ldap, self.system], None, {'X': 'table2.C1', 'X.login': 'table2.C0', 'L': 'table2.C0'}, []),
                     ('OneFetchStep',
-                     [('Any G,L WHERE X in_group G, X login L, G name "managers", (EXISTS(X copain T, T login L, T is EUser)) OR (EXISTS(X in_state S, S name "pascontent", NOT X copain T2, S is State, T2 is EUser)), G is EGroup, X is EUser',
-                       [{'G': 'EGroup', 'L': 'String', 'S': 'State', 'T': 'EUser', 'T2': 'EUser', 'X': 'EUser'}])],
+                     [('Any G,L WHERE X in_group G, X login L, G name "managers", (EXISTS(X copain T, T login L, T is CWUser)) OR (EXISTS(X in_state S, S name "pascontent", NOT X copain T2, S is State, T2 is CWUser)), G is CWGroup, X is CWUser',
+                       [{'G': 'CWGroup', 'L': 'String', 'S': 'State', 'T': 'CWUser', 'T2': 'CWUser', 'X': 'CWUser'}])],
                      None, None, [self.system],
                      {'T2': 'table1.C0', 'L': 'table2.C0',
                       'T': 'table0.C0', 'T.login': 'table0.C1', 'X': 'table2.C1', 'X.login': 'table2.C0'}, [])])
@@ -1115,29 +1115,29 @@
         self._test('Any GN,L WHERE X in_group G, X login L, G name GN, '
                    'EXISTS(X copain T, T login in ("comme", "cochon")) AND '
                    'NOT EXISTS(X copain T2, T2 login "billy")',
-                   [('FetchStep', [('Any T WHERE T login IN("comme", "cochon"), T is EUser',
-                                    [{'T': 'EUser'}])],
+                   [('FetchStep', [('Any T WHERE T login IN("comme", "cochon"), T is CWUser',
+                                    [{'T': 'CWUser'}])],
                      [self.ldap, self.system], None, {'T': 'table0.C0'}, []),
-                    ('FetchStep', [('Any T2 WHERE T2 login "billy", T2 is EUser', [{'T2': 'EUser'}])],
+                    ('FetchStep', [('Any T2 WHERE T2 login "billy", T2 is CWUser', [{'T2': 'CWUser'}])],
                      [self.ldap, self.system], None, {'T2': 'table1.C0'}, []),
-                    ('FetchStep', [('Any L,X WHERE X login L, X is EUser', [{'X': 'EUser', 'L': 'String'}])],
+                    ('FetchStep', [('Any L,X WHERE X login L, X is CWUser', [{'X': 'CWUser', 'L': 'String'}])],
                      [self.ldap, self.system], None,
                      {'X': 'table2.C1', 'X.login': 'table2.C0', 'L': 'table2.C0'}, []),
-                    ('OneFetchStep', [('Any GN,L WHERE X in_group G, X login L, G name GN, EXISTS(X copain T, T is EUser), NOT EXISTS(X copain T2, T2 is EUser), G is EGroup, X is EUser',
-                       [{'G': 'EGroup', 'GN': 'String', 'L': 'String', 'T': 'EUser', 'T2': 'EUser', 'X': 'EUser'}])],
+                    ('OneFetchStep', [('Any GN,L WHERE X in_group G, X login L, G name GN, EXISTS(X copain T, T is CWUser), NOT EXISTS(X copain T2, T2 is CWUser), G is CWGroup, X is CWUser',
+                       [{'G': 'CWGroup', 'GN': 'String', 'L': 'String', 'T': 'CWUser', 'T2': 'CWUser', 'X': 'CWUser'}])],
                      None, None, [self.system],
                      {'T': 'table0.C0', 'T2': 'table1.C0',
                       'X': 'table2.C1', 'X.login': 'table2.C0', 'L': 'table2.C0'}, [])])
             
     def test_exists_security_no_invariant(self):
         ueid = self.session.user.eid
-        self._test('Any X,AA,AB,AC,AD ORDERBY AA WHERE X is EUser, X login AA, X firstname AB, X surname AC, X modification_date AD, A eid %(B)s, \
+        self._test('Any X,AA,AB,AC,AD ORDERBY AA WHERE X is CWUser, X login AA, X firstname AB, X surname AC, X modification_date AD, A eid %(B)s, \
     EXISTS(((X identity A) OR \
-            (EXISTS(X in_group C, C name IN("managers", "staff"), C is EGroup))) OR \
-            (EXISTS(X in_group D, A in_group D, NOT D name "users", D is EGroup)))',
-               [('FetchStep', [('Any X,AA,AB,AC,AD WHERE X login AA, X firstname AB, X surname AC, X modification_date AD, X is EUser',
+            (EXISTS(X in_group C, C name IN("managers", "staff"), C is CWGroup))) OR \
+            (EXISTS(X in_group D, A in_group D, NOT D name "users", D is CWGroup)))',
+               [('FetchStep', [('Any X,AA,AB,AC,AD WHERE X login AA, X firstname AB, X surname AC, X modification_date AD, X is CWUser',
                                 [{'AA': 'String', 'AB': 'String', 'AC': 'String', 'AD': 'Datetime',
-                                  'X': 'EUser'}])],
+                                  'X': 'CWUser'}])],
                  [self.ldap, self.system], None, {'AA': 'table0.C1', 'AB': 'table0.C2',
                                                   'AC': 'table0.C3', 'AD': 'table0.C4',
                                                   'X': 'table0.C0',
@@ -1145,9 +1145,9 @@
                                                   'X.login': 'table0.C1',
                                                   'X.modification_date': 'table0.C4',
                                                   'X.surname': 'table0.C3'}, []),
-                ('OneFetchStep', [('Any X,AA,AB,AC,AD ORDERBY AA WHERE X login AA, X firstname AB, X surname AC, X modification_date AD, EXISTS(((X identity 5) OR (EXISTS(X in_group C, C name IN("managers", "staff"), C is EGroup))) OR (EXISTS(X in_group D, 5 in_group D, NOT D name "users", D is EGroup))), X is EUser',
+                ('OneFetchStep', [('Any X,AA,AB,AC,AD ORDERBY AA WHERE X login AA, X firstname AB, X surname AC, X modification_date AD, EXISTS(((X identity 5) OR (EXISTS(X in_group C, C name IN("managers", "staff"), C is CWGroup))) OR (EXISTS(X in_group D, 5 in_group D, NOT D name "users", D is CWGroup))), X is CWUser',
                                    [{'AA': 'String', 'AB': 'String', 'AC': 'String', 'AD': 'Datetime',
-                                     'C': 'EGroup', 'D': 'EGroup', 'X': 'EUser'}])],
+                                     'C': 'CWGroup', 'D': 'CWGroup', 'X': 'CWUser'}])],
                  None, None, [self.system],
                  {'AA': 'table0.C1', 'AB': 'table0.C2', 'AC': 'table0.C3', 'AD': 'table0.C4',
                   'X': 'table0.C0',
@@ -1158,8 +1158,8 @@
     def test_relation_need_split(self):
         self._test('Any X, S WHERE X in_state S',
                    [('UnionStep', None, None, [
-                       ('OneFetchStep', [('Any X,S WHERE X in_state S, S is State, X is IN(Affaire, EUser)',
-                                          [{'X': 'Affaire', 'S': 'State'}, {'X': 'EUser', 'S': 'State'}])], 
+                       ('OneFetchStep', [('Any X,S WHERE X in_state S, S is State, X is IN(Affaire, CWUser)',
+                                          [{'X': 'Affaire', 'S': 'State'}, {'X': 'CWUser', 'S': 'State'}])], 
                         None, None, [self.system], {}, []),
                        ('OneFetchStep', [('Any X,S WHERE X in_state S, S is State, X is Note',
                                           [{'X': 'Note', 'S': 'State'}])], 
@@ -1172,8 +1172,8 @@
                                     [{'X': 'Note', 'S': 'State'}])],
                      [self.rql, self.system], None, {'X': 'table0.C0', 'S': 'table0.C1'}, []),
                      ('UnionStep', None, None,
-                      [('OneFetchStep', [('Any X,S,U WHERE X in_state S, X todo_by U, S is State, U is EUser, X is Note',
-                                          [{'X': 'Note', 'S': 'State', 'U': 'EUser'}])],
+                      [('OneFetchStep', [('Any X,S,U WHERE X in_state S, X todo_by U, S is State, U is CWUser, X is Note',
+                                          [{'X': 'Note', 'S': 'State', 'U': 'CWUser'}])],
                         None, None, [self.system], {'X': 'table0.C0', 'S': 'table0.C1'}, []),
                        ('OneFetchStep', [('Any X,S,U WHERE X in_state S, X todo_by U, S is State, U is Personne, X is Affaire',
                                           [{'X': 'Affaire', 'S': 'State', 'U': 'Personne'}])],
@@ -1187,8 +1187,8 @@
                                     [{'X': 'Note', 'S': 'State'}])],
                      [self.rql, self.system], None, {'X': 'table0.C0'}, []),
                      ('UnionStep', None, None,
-                      [('OneFetchStep', [('Any X,U WHERE X todo_by U, U is EUser, X is Note',
-                                          [{'X': 'Note', 'U': 'EUser'}])],
+                      [('OneFetchStep', [('Any X,U WHERE X todo_by U, U is CWUser, X is Note',
+                                          [{'X': 'Note', 'U': 'CWUser'}])],
                         None, None, [self.system], {'X': 'table0.C0'}, []),
                        ('OneFetchStep', [('Any X,U WHERE X in_state S, S name "pending", X todo_by U, S is State, U is Personne, X is Affaire',
                                           [{'S': 'State', 'U': 'Personne', 'X': 'Affaire'}])],
@@ -1206,9 +1206,9 @@
                                            [{'X': 'Note', 'T': 'Tag'}])],
                          None, None,
                          [self.system], {'X': 'table0.C0'}, []),
-                        ('OneFetchStep', [('Any X,T WHERE X in_state S, S name "pending", T tags X, S is State, T is Tag, X is IN(Affaire, EUser)',
+                        ('OneFetchStep', [('Any X,T WHERE X in_state S, S name "pending", T tags X, S is State, T is Tag, X is IN(Affaire, CWUser)',
                                            [{'X': 'Affaire', 'S': 'State', 'T': 'Tag'},
-                                            {'X': 'EUser', 'S': 'State', 'T': 'Tag'}])],
+                                            {'X': 'CWUser', 'S': 'State', 'T': 'Tag'}])],
                          None, None,
                          [self.system], {}, []),
                         ])
@@ -1251,9 +1251,9 @@
                        None, None, [self.rql, self.system], {},
                        []),
                       ('OneFetchStep',
-                       [('Any SN WHERE NOT X in_state S, S name SN, S is State, X is IN(Affaire, EUser)',
+                       [('Any SN WHERE NOT X in_state S, S name SN, S is State, X is IN(Affaire, CWUser)',
                          [{'S': 'State', 'SN': 'String', 'X': 'Affaire'},
-                          {'S': 'State', 'SN': 'String', 'X': 'EUser'}])],
+                          {'S': 'State', 'SN': 'String', 'X': 'CWUser'}])],
                        None, None, [self.system], {'S': 'table0.C1', 'S.name': 'table0.C0', 'SN': 'table0.C0'},
                        []),]
                      )])
@@ -1265,10 +1265,10 @@
                                     [{'A': 'Note', 'C': 'Datetime', 'B': 'Datetime'}])],
                      [self.rql], None,
                      {'A': 'table0.C0', 'A.creation_date': 'table0.C1', 'A.modification_date': 'table0.C2', 'C': 'table0.C2', 'B': 'table0.C1'}, []),
-                    #('FetchStep', [('Any D WHERE D is EUser', [{'D': 'EUser'}])],
+                    #('FetchStep', [('Any D WHERE D is CWUser', [{'D': 'CWUser'}])],
                     # [self.ldap, self.system], None, {'D': 'table1.C0'}, []),
-                    ('OneFetchStep', [('Any A,B,C,D WHERE A creation_date B, A modification_date C, A todo_by D?, A is Note, D is EUser',
-                                       [{'A': 'Note', 'C': 'Datetime', 'B': 'Datetime', 'D': 'EUser'}])],
+                    ('OneFetchStep', [('Any A,B,C,D WHERE A creation_date B, A modification_date C, A todo_by D?, A is Note, D is CWUser',
+                                       [{'A': 'Note', 'C': 'Datetime', 'B': 'Datetime', 'D': 'CWUser'}])],
                      None, None, [self.system],
                      {'A': 'table0.C0', 'A.creation_date': 'table0.C1', 'A.modification_date': 'table0.C2', 'C': 'table0.C2', 'B': 'table0.C1'}, [])],
                    {'x': 999999})
@@ -1278,7 +1278,7 @@
         repo._type_source_cache[999999] = ('Note', 'cards', 999999)
         self._test('Any U WHERE U in_group G, (G name IN ("managers", "logilab") OR (X require_permission P?, P name "bla", P require_group G)), X eid %(x)s, U eid %(u)s',
                    [('OneFetchStep', [('Any 5 WHERE 5 in_group G, (G name IN("managers", "logilab")) OR (X require_permission P?, P name "bla", P require_group G), X eid 999999',
-                                       [{'X': 'Note', 'G': 'EGroup', 'P': 'EPermission'}])],
+                                       [{'X': 'Note', 'G': 'CWGroup', 'P': 'CWPermission'}])],
                      None, None, [self.system], {}, [])],
                    {'x': 999999, 'u': self.session.user.eid})
 
@@ -1382,11 +1382,11 @@
                                     [{'T': 'String', 'X': 'Bookmark'}])],
                      [self.system], {}, {'N': 'table0.C1', 'X': 'table0.C0', 'X.name': 'table0.C1'}, []),
                     ('FetchStep',
-                     [('Any B,C WHERE B login C, B is EUser', [{'B': 'EUser', 'C': 'String'}])],
+                     [('Any B,C WHERE B login C, B is CWUser', [{'B': 'CWUser', 'C': 'String'}])],
                      [self.ldap, self.system], None, {'B': 'table1.C0', 'B.login': 'table1.C1', 'C': 'table1.C1'}, []),
-                    ('OneFetchStep', [('DISTINCT Any B,C ORDERBY C WHERE A created_by B, B login C, EXISTS(B owned_by 5), B is EUser',
-                                       [{'A': 'Bookmark', 'B': 'EUser', 'C': 'String'},
-                                        {'A': 'Tag', 'B': 'EUser', 'C': 'String'}])],
+                    ('OneFetchStep', [('DISTINCT Any B,C ORDERBY C WHERE A created_by B, B login C, EXISTS(B owned_by 5), B is CWUser',
+                                       [{'A': 'Bookmark', 'B': 'CWUser', 'C': 'String'},
+                                        {'A': 'Tag', 'B': 'CWUser', 'C': 'String'}])],
                      None, None, [self.system],
                      {'A': 'table0.C0',
                       'B': 'table1.C0', 'B.login': 'table1.C1',
@@ -1416,11 +1416,11 @@
                         'X.title': 'table0.C1'}, []),
                       ]),
                     ('FetchStep',
-                     [('Any B,C WHERE B login C, B is EUser', [{'B': 'EUser', 'C': 'String'}])],
+                     [('Any B,C WHERE B login C, B is CWUser', [{'B': 'CWUser', 'C': 'String'}])],
                      [self.ldap, self.system], None, {'B': 'table1.C0', 'B.login': 'table1.C1', 'C': 'table1.C1'}, []),
-                    ('OneFetchStep', [('DISTINCT Any B,C ORDERBY C WHERE A created_by B, B login C, EXISTS(B owned_by 5), B is EUser',
-                                       [{'A': 'Card', 'B': 'EUser', 'C': 'String'},
-                                        {'A': 'Tag', 'B': 'EUser', 'C': 'String'}])],
+                    ('OneFetchStep', [('DISTINCT Any B,C ORDERBY C WHERE A created_by B, B login C, EXISTS(B owned_by 5), B is CWUser',
+                                       [{'A': 'Card', 'B': 'CWUser', 'C': 'String'},
+                                        {'A': 'Tag', 'B': 'CWUser', 'C': 'String'}])],
                      None, None, [self.system],
                      {'A': 'table0.C0',
                       'B': 'table1.C0', 'B.login': 'table1.C1',
@@ -1607,8 +1607,8 @@
         ueid = self.session.user.eid
         self._test('DELETE X created_by Y WHERE X eid %(x)s, NOT Y eid %(y)s',
                    [('DeleteRelationsStep', [
-                       ('OneFetchStep', [('Any 5,Y WHERE %s created_by Y, NOT Y eid %s, Y is EUser'%(ueid, ueid),
-                                          [{'Y': 'EUser'}])],
+                       ('OneFetchStep', [('Any 5,Y WHERE %s created_by Y, NOT Y eid %s, Y is CWUser'%(ueid, ueid),
+                                          [{'Y': 'CWUser'}])],
                         None, None, [self.system], {}, []),
                        ]),
                     ],
@@ -1617,10 +1617,10 @@
     def test_delete_relation2(self):
         ueid = self.session.user.eid
         self._test('DELETE X created_by Y WHERE X eid %(x)s, NOT Y login "syt"',
-                   [('FetchStep', [('Any Y WHERE NOT Y login "syt", Y is EUser', [{'Y': 'EUser'}])],
+                   [('FetchStep', [('Any Y WHERE NOT Y login "syt", Y is CWUser', [{'Y': 'CWUser'}])],
                      [self.ldap, self.system], None, {'Y': 'table0.C0'}, []),
                     ('DeleteRelationsStep', [
-                        ('OneFetchStep', [('Any %s,Y WHERE %s created_by Y, Y is EUser'%(ueid,ueid), [{'Y': 'EUser'}])],
+                        ('OneFetchStep', [('Any %s,Y WHERE %s created_by Y, Y is CWUser'%(ueid,ueid), [{'Y': 'CWUser'}])],
                          None, None, [self.system], {'Y': 'table0.C0'}, []),
                         ]),
                     ],
@@ -1651,26 +1651,26 @@
     def test_update(self):
         self._test('SET X copain Y WHERE X login "comme", Y login "cochon"',
                    [('FetchStep',
-                     [('Any X WHERE X login "comme", X is EUser', [{'X': 'EUser'}])],
+                     [('Any X WHERE X login "comme", X is CWUser', [{'X': 'CWUser'}])],
                      [self.ldap, self.system], None, {'X': 'table0.C0'}, []),
                     ('FetchStep',
-                     [('Any Y WHERE Y login "cochon", Y is EUser', [{'Y': 'EUser'}])],
+                     [('Any Y WHERE Y login "cochon", Y is CWUser', [{'Y': 'CWUser'}])],
                      [self.ldap, self.system], None, {'Y': 'table1.C0'}, []),
                     ('UpdateStep',
                      [('OneFetchStep',
-                       [('DISTINCT Any X,Y WHERE X is EUser, Y is EUser',
-                         [{'X': 'EUser', 'Y': 'EUser'}])],
+                       [('DISTINCT Any X,Y WHERE X is CWUser, Y is CWUser',
+                         [{'X': 'CWUser', 'Y': 'CWUser'}])],
                        None, None, [self.system], {'X': 'table0.C0', 'Y': 'table1.C0'}, [])
                       ])
                     ])
 
     def test_update2(self):
         self._test('SET U in_group G WHERE G name ~= "bougloup%", U login "admin"',
-                   [('FetchStep', [('Any U WHERE U login "admin", U is EUser', [{'U': 'EUser'}])],
+                   [('FetchStep', [('Any U WHERE U login "admin", U is CWUser', [{'U': 'CWUser'}])],
                      [self.ldap, self.system], None, {'U': 'table0.C0'}, []),
                      ('UpdateStep', [
-                        ('OneFetchStep', [('DISTINCT Any U,G WHERE G name ILIKE "bougloup%", G is EGroup, U is EUser',
-                                           [{'U': 'EUser', 'G': 'EGroup'}])],
+                        ('OneFetchStep', [('DISTINCT Any U,G WHERE G name ILIKE "bougloup%", G is CWGroup, U is CWUser',
+                                           [{'U': 'CWUser', 'G': 'CWGroup'}])],
                          None, None, [self.system], {'U': 'table0.C0'}, []),
                         ]),
                     ])
@@ -1690,14 +1690,14 @@
 
 #     def test_update4(self):
 #         # since we are adding a in_state relation with a state from the system
-#         # source, EUser should only be searched only in the system source as well
+#         # source, CWUser should only be searched only in the system source as well
 #         rset = self.execute('State X WHERE X name "activated"')
 #         assert len(rset) == 1, rset
 #         activatedeid = rset[0][0]
-#         self._test('SET X in_state S WHERE X is EUser, S eid %s' % activatedeid,
+#         self._test('SET X in_state S WHERE X is CWUser, S eid %s' % activatedeid,
 #                    [('UpdateStep', [
-#                        ('OneFetchStep', [('DISTINCT Any X,%s WHERE X is EUser' % activatedeid,
-#                                           [{'X': 'EUser'}])],
+#                        ('OneFetchStep', [('DISTINCT Any X,%s WHERE X is CWUser' % activatedeid,
+#                                           [{'X': 'CWUser'}])],
 #                         None, None, [self.system], {}, []),
 #                        ]),
 #                     ])
@@ -1707,14 +1707,14 @@
     def test_nonregr1(self):
         self._test('Any X, Y WHERE X copain Y, X login "syt", Y login "cochon"',
                    [('FetchStep',
-                     [('Any X WHERE X login "syt", X is EUser', [{'X': 'EUser'}])],
+                     [('Any X WHERE X login "syt", X is CWUser', [{'X': 'CWUser'}])],
                      [self.ldap, self.system], None, {'X': 'table0.C0'}, []),
                     ('FetchStep',
-                     [('Any Y WHERE Y login "cochon", Y is EUser', [{'Y': 'EUser'}])],
+                     [('Any Y WHERE Y login "cochon", Y is CWUser', [{'Y': 'CWUser'}])],
                      [self.ldap, self.system], None, {'Y': 'table1.C0'}, []),
                     ('OneFetchStep',
-                     [('Any X,Y WHERE X copain Y, X is EUser, Y is EUser',
-                       [{'X': 'EUser', 'Y': 'EUser'}])],
+                     [('Any X,Y WHERE X copain Y, X is CWUser, Y is CWUser',
+                       [{'X': 'CWUser', 'Y': 'CWUser'}])],
                      None, None, [self.system], {'X': 'table0.C0', 'Y': 'table1.C0'}, [])
                     ])
     
@@ -1724,8 +1724,8 @@
                    [('FetchStep', [('Any X,D WHERE X modification_date D, X is Note',
                                     [{'X': 'Note', 'D': 'Datetime'}])],
                      [self.rql, self.system], None, {'X': 'table0.C0', 'X.modification_date': 'table0.C1', 'D': 'table0.C1'}, []),
-                    ('FetchStep', [('Any X,D WHERE X modification_date D, X is EUser',
-                                    [{'X': 'EUser', 'D': 'Datetime'}])],
+                    ('FetchStep', [('Any X,D WHERE X modification_date D, X is CWUser',
+                                    [{'X': 'CWUser', 'D': 'Datetime'}])],
                      [self.ldap, self.system], None, {'X': 'table1.C0', 'X.modification_date': 'table1.C1', 'D': 'table1.C1'}, []),
                     ('AggrStep', 'Any X ORDERBY D DESC', None, None, 'table2', None, [
                         ('FetchStep', [('Any X,D WHERE E eid %s, E wf_info_for X, X modification_date D, E is TrInfo, X is Affaire'%treid,
@@ -1733,8 +1733,8 @@
                          [self.system],
                          {},
                          {'X': 'table2.C0', 'X.modification_date': 'table2.C1', 'D': 'table2.C1', 'E.wf_info_for': 'table2.C0'}, []),
-                        ('FetchStep', [('Any X,D WHERE E eid %s, E wf_info_for X, X modification_date D, E is TrInfo, X is EUser'%treid,
-                                        [{'X': 'EUser', 'E': 'TrInfo', 'D': 'Datetime'}])],
+                        ('FetchStep', [('Any X,D WHERE E eid %s, E wf_info_for X, X modification_date D, E is TrInfo, X is CWUser'%treid,
+                                        [{'X': 'CWUser', 'E': 'TrInfo', 'D': 'Datetime'}])],
                          [self.system],
                          {'X': 'table1.C0', 'X.modification_date': 'table1.C1', 'D': 'table1.C1'},
                          {'X': 'table2.C0', 'X.modification_date': 'table2.C1', 'D': 'table2.C1', 'E.wf_info_for': 'table2.C0'}, []),
@@ -1749,22 +1749,22 @@
         
     def test_nonregr3(self):
         # original jpl query:
-        # Any X, NOW - CD, P WHERE P is Project, U interested_in P, U is EUser, U login "sthenault", X concerns P, X creation_date CD ORDERBY CD DESC LIMIT 5
+        # Any X, NOW - CD, P WHERE P is Project, U interested_in P, U is CWUser, U login "sthenault", X concerns P, X creation_date CD ORDERBY CD DESC LIMIT 5
         self._test('Any X, NOW - CD, P ORDERBY CD DESC LIMIT 5 WHERE P bookmarked_by U, U login "admin", P is X, X creation_date CD',
-                   [('FetchStep', [('Any U WHERE U login "admin", U is EUser', [{'U': 'EUser'}])],
+                   [('FetchStep', [('Any U WHERE U login "admin", U is CWUser', [{'U': 'CWUser'}])],
                      [self.ldap, self.system], None, {'U': 'table0.C0'}, []),
-                    ('OneFetchStep', [('Any X,(NOW - CD),P ORDERBY CD DESC LIMIT 5 WHERE P bookmarked_by U, P is X, X creation_date CD, P is Bookmark, U is EUser, X is EEType',
-                                       [{'P': 'Bookmark', 'U': 'EUser', 'X': 'EEType', 'CD': 'Datetime'}])],
+                    ('OneFetchStep', [('Any X,(NOW - CD),P ORDERBY CD DESC LIMIT 5 WHERE P bookmarked_by U, P is X, X creation_date CD, P is Bookmark, U is CWUser, X is CWEType',
+                                       [{'P': 'Bookmark', 'U': 'CWUser', 'X': 'CWEType', 'CD': 'Datetime'}])],
                      5, None,  [self.system], {'U': 'table0.C0'}, [])]
                    )
         
     def test_nonregr4(self):
         self._test('Any U ORDERBY D DESC WHERE WF wf_info_for X, WF creation_date D, WF from_state FS, '
                    'WF owned_by U?, X eid %(x)s',
-                   [#('FetchStep', [('Any U WHERE U is EUser', [{'U': 'EUser'}])],
+                   [#('FetchStep', [('Any U WHERE U is CWUser', [{'U': 'CWUser'}])],
                     # [self.ldap, self.system], None, {'U': 'table0.C0'}, []),
                     ('OneFetchStep', [('Any U ORDERBY D DESC WHERE WF wf_info_for 5, WF creation_date D, WF from_state FS, WF owned_by U?',
-                                       [{'WF': 'TrInfo', 'FS': 'State', 'U': 'EUser', 'D': 'Datetime'}])],
+                                       [{'WF': 'TrInfo', 'FS': 'State', 'U': 'CWUser', 'D': 'Datetime'}])],
                      None, None,
                      [self.system], {}, [])],
                    {'x': self.session.user.eid})
@@ -1837,17 +1837,17 @@
                    {'x': 999999, 'z': 999998})
 
     def test_nonregr10(self):
-        repo._type_source_cache[999999] = ('EUser', 'ldapuser', 999999)
+        repo._type_source_cache[999999] = ('CWUser', 'ldapuser', 999999)
         self._test('Any X,AA,AB ORDERBY AA WHERE E eid %(x)s, E owned_by X, X login AA, X modification_date AB',
                    [('FetchStep',
-                     [('Any X,AA,AB WHERE X login AA, X modification_date AB, X is EUser',
-                       [{'AA': 'String', 'AB': 'Datetime', 'X': 'EUser'}])],
+                     [('Any X,AA,AB WHERE X login AA, X modification_date AB, X is CWUser',
+                       [{'AA': 'String', 'AB': 'Datetime', 'X': 'CWUser'}])],
                      [self.ldap, self.system], None, {'AA': 'table0.C1', 'AB': 'table0.C2',
                                                       'X': 'table0.C0', 'X.login': 'table0.C1', 'X.modification_date': 'table0.C2'},
                      []),
                     ('OneFetchStep',
-                     [('Any X,AA,AB ORDERBY AA WHERE 999999 owned_by X, X login AA, X modification_date AB, X is EUser',
-                       [{'AA': 'String', 'AB': 'Datetime', 'X': 'EUser'}])],
+                     [('Any X,AA,AB ORDERBY AA WHERE 999999 owned_by X, X login AA, X modification_date AB, X is CWUser',
+                       [{'AA': 'String', 'AB': 'Datetime', 'X': 'CWUser'}])],
                      None, None, [self.system], {'AA': 'table0.C1', 'AB': 'table0.C2',
                                                  'X': 'table0.C0', 'X.login': 'table0.C1', 'X.modification_date': 'table0.C2'},
                      [])
@@ -1858,11 +1858,11 @@
         repo._type_source_cache[999999] = ('Bookmark', 'system', 999999)
         self._test('SET X bookmarked_by Y WHERE X eid %(x)s, Y login "hop"',
                    [('FetchStep',
-                     [('Any Y WHERE Y login "hop", Y is EUser', [{'Y': 'EUser'}])],
+                     [('Any Y WHERE Y login "hop", Y is CWUser', [{'Y': 'CWUser'}])],
                      [self.ldap, self.system],
                      None, {'Y': 'table0.C0'}, []),
                     ('UpdateStep',
-                     [('OneFetchStep', [('DISTINCT Any 999999,Y WHERE Y is EUser', [{'Y': 'EUser'}])],
+                     [('OneFetchStep', [('DISTINCT Any 999999,Y WHERE Y is CWUser', [{'Y': 'CWUser'}])],
                        None, None, [self.system], {'Y': 'table0.C0'},
                        [])]
                      )],
@@ -1898,20 +1898,20 @@
         self._test('Any B,U,UL GROUPBY B,U,UL WHERE B created_by U?, B is File '
                    'WITH U,UL BEING (Any U,UL WHERE ME eid %(x)s, (EXISTS(U identity ME) '
                    'OR (EXISTS(U in_group G, G name IN("managers", "staff")))) '
-                   'OR (EXISTS(U in_group H, ME in_group H, NOT H name "users")), U login UL, U is EUser)',
-                   [('FetchStep', [('Any U,UL WHERE U login UL, U is EUser',
-                                    [{'U': 'EUser', 'UL': 'String'}])],
+                   'OR (EXISTS(U in_group H, ME in_group H, NOT H name "users")), U login UL, U is CWUser)',
+                   [('FetchStep', [('Any U,UL WHERE U login UL, U is CWUser',
+                                    [{'U': 'CWUser', 'UL': 'String'}])],
                      [self.ldap, self.system], None,
                      {'U': 'table0.C0', 'U.login': 'table0.C1', 'UL': 'table0.C1'},
                      []),
-                    ('FetchStep', [('Any U,UL WHERE ((EXISTS(U identity 5)) OR (EXISTS(U in_group G, G name IN("managers", "staff"), G is EGroup))) OR (EXISTS(U in_group H, 5 in_group H, NOT H name "users", H is EGroup)), U login UL, U is EUser',
-                                    [{'G': 'EGroup', 'H': 'EGroup', 'U': 'EUser', 'UL': 'String'}])],
+                    ('FetchStep', [('Any U,UL WHERE ((EXISTS(U identity 5)) OR (EXISTS(U in_group G, G name IN("managers", "staff"), G is CWGroup))) OR (EXISTS(U in_group H, 5 in_group H, NOT H name "users", H is CWGroup)), U login UL, U is CWUser',
+                                    [{'G': 'CWGroup', 'H': 'CWGroup', 'U': 'CWUser', 'UL': 'String'}])],
                      [self.system],
                      {'U': 'table0.C0', 'U.login': 'table0.C1', 'UL': 'table0.C1'},
                      {'U': 'table1.C0', 'U.login': 'table1.C1', 'UL': 'table1.C1'},
                      []),
                     ('OneFetchStep', [('Any B,U,UL GROUPBY B,U,UL WHERE B created_by U?, B is File',
-                                       [{'B': 'File', 'U': 'EUser', 'UL': 'String'}])],
+                                       [{'B': 'File', 'U': 'CWUser', 'UL': 'String'}])],
                      None, None, [self.system],
                      {'U': 'table1.C0', 'UL': 'table1.C1'},
                      [])],
@@ -1932,20 +1932,20 @@
         self._test('Any B,U,UL GROUPBY B,U,UL WHERE B created_by U?, B is File '
                    'WITH U,UL BEING (Any U,UL WHERE ME eid %(x)s, (U identity ME '
                    'OR (EXISTS(U in_group G, G name IN("managers", "staff")))) '
-                   'OR (EXISTS(U in_group H, ME in_group H, NOT H name "users")), U login UL, U is EUser)',
-                   [('FetchStep', [('Any U,UL WHERE U login UL, U is EUser',
-                                    [{'U': 'EUser', 'UL': 'String'}])],
+                   'OR (EXISTS(U in_group H, ME in_group H, NOT H name "users")), U login UL, U is CWUser)',
+                   [('FetchStep', [('Any U,UL WHERE U login UL, U is CWUser',
+                                    [{'U': 'CWUser', 'UL': 'String'}])],
                      [self.ldap, self.system], None,
                      {'U': 'table0.C0', 'U.login': 'table0.C1', 'UL': 'table0.C1'},
                      []),
-                    ('FetchStep', [('Any U,UL WHERE ((U identity 5) OR (EXISTS(U in_group G, G name IN("managers", "staff"), G is EGroup))) OR (EXISTS(U in_group H, 5 in_group H, NOT H name "users", H is EGroup)), U login UL, U is EUser',
-                                    [{'G': 'EGroup', 'H': 'EGroup', 'U': 'EUser', 'UL': 'String'}])],
+                    ('FetchStep', [('Any U,UL WHERE ((U identity 5) OR (EXISTS(U in_group G, G name IN("managers", "staff"), G is CWGroup))) OR (EXISTS(U in_group H, 5 in_group H, NOT H name "users", H is CWGroup)), U login UL, U is CWUser',
+                                    [{'G': 'CWGroup', 'H': 'CWGroup', 'U': 'CWUser', 'UL': 'String'}])],
                      [self.system],
                      {'U': 'table0.C0', 'U.login': 'table0.C1', 'UL': 'table0.C1'},
                      {'U': 'table1.C0', 'U.login': 'table1.C1', 'UL': 'table1.C1'},
                      []),
                     ('OneFetchStep', [('Any B,U,UL GROUPBY B,U,UL WHERE B created_by U?, B is File',
-                                       [{'B': 'File', 'U': 'EUser', 'UL': 'String'}])],
+                                       [{'B': 'File', 'U': 'CWUser', 'UL': 'String'}])],
                      None, None, [self.system],
                      {'U': 'table1.C0', 'UL': 'table1.C1'},
                      [])],
--- a/server/test/unittest_multisources.py	Fri Apr 17 13:21:05 2009 +0200
+++ b/server/test/unittest_multisources.py	Fri Apr 17 16:55:37 2009 +0200
@@ -195,8 +195,8 @@
         
     def test_union(self):
         afeids = self.execute('Affaire X')
-        ueids = self.execute('EUser X')
-        rset = self.execute('(Any X WHERE X is Affaire) UNION (Any X WHERE X is EUser)')
+        ueids = self.execute('CWUser X')
+        rset = self.execute('(Any X WHERE X is Affaire) UNION (Any X WHERE X is CWUser)')
         self.assertEquals(sorted(r[0] for r in rset.rows),
                           sorted(r[0] for r in afeids + ueids))
         
--- a/server/test/unittest_querier.py	Fri Apr 17 13:21:05 2009 +0200
+++ b/server/test/unittest_querier.py	Fri Apr 17 16:55:37 2009 +0200
@@ -39,7 +39,7 @@
 
 class MakeSchemaTC(TestCase):
     def test_known_values(self):
-        solution = {'A': 'String', 'B': 'EUser'}
+        solution = {'A': 'String', 'B': 'CWUser'}
         self.assertEquals(make_schema((Variable('A'), Variable('B')), solution, 
                                       'table0', TYPEMAP),
                           ('C0 text,C1 integer', {'A': 'table0.C0', 'B': 'table0.C1'}))
@@ -60,13 +60,13 @@
         pass
     
     def test_preprocess_1(self):
-        reid = self.execute('Any X WHERE X is ERType, X name "owned_by"')[0][0]
+        reid = self.execute('Any X WHERE X is CWRType, X name "owned_by"')[0][0]
         rqlst = self._prepare('Any COUNT(RDEF) WHERE RDEF relation_type X, X eid %(x)s', {'x': reid})
-        self.assertEquals(rqlst.solutions, [{'RDEF': 'EFRDef'}, {'RDEF': 'ENFRDef'}])
+        self.assertEquals(rqlst.solutions, [{'RDEF': 'CWAttribute'}, {'RDEF': 'CWRelation'}])
         
     def test_preprocess_2(self):
         teid = self.execute("INSERT Tag X: X name 'tag'")[0][0]
-        #geid = self.execute("EGroup G WHERE G name 'users'")[0][0]
+        #geid = self.execute("CWGroup G WHERE G name 'users'")[0][0]
         #self.execute("SET X tags Y WHERE X eid %(t)s, Y eid %(g)s",
         #             {'g': geid, 't': teid}, 'g')
         rqlst = self._prepare('Any X WHERE E eid %(x)s, E tags X', {'x': teid})
@@ -96,7 +96,7 @@
                           ' OR (EXISTS(H concerne G?, G owned_by %(B)s, G is SubDivision, X identity H, H is Affaire)))'
                           ' OR (EXISTS(I concerne F?, F owned_by %(B)s, F is Societe, X identity I, I is Affaire)))'
                           ' OR (EXISTS(J concerne E?, E owned_by %(B)s, E is Note, X identity J, J is Affaire)))'
-                          ', ET is EEType, X is Affaire')
+                          ', ET is CWEType, X is Affaire')
         self.assertEquals(solutions, [{'C': 'Division',
                                        'D': 'Affaire',
                                        'E': 'Note',
@@ -106,47 +106,47 @@
                                        'I': 'Affaire',
                                        'J': 'Affaire',
                                        'X': 'Affaire',
-                                       'ET': 'EEType', 'ETN': 'String'}])
+                                       'ET': 'CWEType', 'ETN': 'String'}])
         rql, solutions = partrqls[1]
-        self.assertEquals(rql,  'Any ETN,X WHERE X is ET, ET name ETN, ET is EEType, '
-                          'X is IN(Bookmark, Card, Comment, Division, ECache, EConstraint, EConstraintType, EEType, EFRDef, EGroup, ENFRDef, EPermission, EProperty, ERType, EUser, Email, EmailAddress, EmailPart, EmailThread, File, Folder, Image, Note, Personne, RQLExpression, Societe, State, SubDivision, Tag, TrInfo, Transition)')
+        self.assertEquals(rql,  'Any ETN,X WHERE X is ET, ET name ETN, ET is CWEType, '
+                          'X is IN(Bookmark, Card, Comment, Division, CWCache, CWConstraint, CWConstraintType, CWEType, CWAttribute, CWGroup, CWRelation, CWPermission, CWProperty, CWRType, CWUser, Email, EmailAddress, EmailPart, EmailThread, File, Folder, Image, Note, Personne, RQLExpression, Societe, State, SubDivision, Tag, TrInfo, Transition)')
         self.assertListEquals(sorted(solutions),
-                              sorted([{'X': 'Bookmark', 'ETN': 'String', 'ET': 'EEType'},
-                                      {'X': 'Card', 'ETN': 'String', 'ET': 'EEType'},
-                                      {'X': 'Comment', 'ETN': 'String', 'ET': 'EEType'},
-                                      {'X': 'Division', 'ETN': 'String', 'ET': 'EEType'},
-                                      {'X': 'ECache', 'ETN': 'String', 'ET': 'EEType'},
-                                      {'X': 'EConstraint', 'ETN': 'String', 'ET': 'EEType'},
-                                      {'X': 'EConstraintType', 'ETN': 'String', 'ET': 'EEType'},
-                                      {'X': 'EEType', 'ETN': 'String', 'ET': 'EEType'},
-                                      {'X': 'EFRDef', 'ETN': 'String', 'ET': 'EEType'},
-                                      {'X': 'EGroup', 'ETN': 'String', 'ET': 'EEType'},
-                                      {'X': 'Email', 'ETN': 'String', 'ET': 'EEType'},
-                                      {'X': 'EmailAddress', 'ETN': 'String', 'ET': 'EEType'},
-                                      {'X': 'EmailPart', 'ETN': 'String', 'ET': 'EEType'},
-                                      {'X': 'EmailThread', 'ETN': 'String', 'ET': 'EEType'},
-                                      {'X': 'ENFRDef', 'ETN': 'String', 'ET': 'EEType'},
-                                      {'X': 'EPermission', 'ETN': 'String', 'ET': 'EEType'},
-                                      {'X': 'EProperty', 'ETN': 'String', 'ET': 'EEType'},
-                                      {'X': 'ERType', 'ETN': 'String', 'ET': 'EEType'},
-                                      {'X': 'EUser', 'ETN': 'String', 'ET': 'EEType'},
-                                      {'X': 'File', 'ETN': 'String', 'ET': 'EEType'},
-                                      {'X': 'Folder', 'ETN': 'String', 'ET': 'EEType'},
-                                      {'X': 'Image', 'ETN': 'String', 'ET': 'EEType'},
-                                      {'X': 'Note', 'ETN': 'String', 'ET': 'EEType'},
-                                      {'X': 'Personne', 'ETN': 'String', 'ET': 'EEType'},
-                                      {'X': 'RQLExpression', 'ETN': 'String', 'ET': 'EEType'},
-                                      {'X': 'Societe', 'ETN': 'String', 'ET': 'EEType'},
-                                      {'X': 'State', 'ETN': 'String', 'ET': 'EEType'},
-                                      {'X': 'SubDivision', 'ETN': 'String', 'ET': 'EEType'},
-                                      {'X': 'Tag', 'ETN': 'String', 'ET': 'EEType'},
-                                      {'X': 'Transition', 'ETN': 'String', 'ET': 'EEType'},
-                                      {'X': 'TrInfo', 'ETN': 'String', 'ET': 'EEType'}]))
+                              sorted([{'X': 'Bookmark', 'ETN': 'String', 'ET': 'CWEType'},
+                                      {'X': 'Card', 'ETN': 'String', 'ET': 'CWEType'},
+                                      {'X': 'Comment', 'ETN': 'String', 'ET': 'CWEType'},
+                                      {'X': 'Division', 'ETN': 'String', 'ET': 'CWEType'},
+                                      {'X': 'CWCache', 'ETN': 'String', 'ET': 'CWEType'},
+                                      {'X': 'CWConstraint', 'ETN': 'String', 'ET': 'CWEType'},
+                                      {'X': 'CWConstraintType', 'ETN': 'String', 'ET': 'CWEType'},
+                                      {'X': 'CWEType', 'ETN': 'String', 'ET': 'CWEType'},
+                                      {'X': 'CWAttribute', 'ETN': 'String', 'ET': 'CWEType'},
+                                      {'X': 'CWGroup', 'ETN': 'String', 'ET': 'CWEType'},
+                                      {'X': 'Email', 'ETN': 'String', 'ET': 'CWEType'},
+                                      {'X': 'EmailAddress', 'ETN': 'String', 'ET': 'CWEType'},
+                                      {'X': 'EmailPart', 'ETN': 'String', 'ET': 'CWEType'},
+                                      {'X': 'EmailThread', 'ETN': 'String', 'ET': 'CWEType'},
+                                      {'X': 'CWRelation', 'ETN': 'String', 'ET': 'CWEType'},
+                                      {'X': 'CWPermission', 'ETN': 'String', 'ET': 'CWEType'},
+                                      {'X': 'CWProperty', 'ETN': 'String', 'ET': 'CWEType'},
+                                      {'X': 'CWRType', 'ETN': 'String', 'ET': 'CWEType'},
+                                      {'X': 'CWUser', 'ETN': 'String', 'ET': 'CWEType'},
+                                      {'X': 'File', 'ETN': 'String', 'ET': 'CWEType'},
+                                      {'X': 'Folder', 'ETN': 'String', 'ET': 'CWEType'},
+                                      {'X': 'Image', 'ETN': 'String', 'ET': 'CWEType'},
+                                      {'X': 'Note', 'ETN': 'String', 'ET': 'CWEType'},
+                                      {'X': 'Personne', 'ETN': 'String', 'ET': 'CWEType'},
+                                      {'X': 'RQLExpression', 'ETN': 'String', 'ET': 'CWEType'},
+                                      {'X': 'Societe', 'ETN': 'String', 'ET': 'CWEType'},
+                                      {'X': 'State', 'ETN': 'String', 'ET': 'CWEType'},
+                                      {'X': 'SubDivision', 'ETN': 'String', 'ET': 'CWEType'},
+                                      {'X': 'Tag', 'ETN': 'String', 'ET': 'CWEType'},
+                                      {'X': 'Transition', 'ETN': 'String', 'ET': 'CWEType'},
+                                      {'X': 'TrInfo', 'ETN': 'String', 'ET': 'CWEType'}]))
         rql, solutions = partrqls[2]
         self.assertEquals(rql,
                           'Any ETN,X WHERE X is ET, ET name ETN, EXISTS(X owned_by %(C)s), '
-                          'ET is EEType, X is Basket')
-        self.assertEquals(solutions, [{'ET': 'EEType',
+                          'ET is CWEType, X is Basket')
+        self.assertEquals(solutions, [{'ET': 'CWEType',
                                        'X': 'Basket',
                                        'ETN': 'String',
                                        }])
@@ -170,7 +170,7 @@
     def test_build_description(self):
         # should return an empty result set
         rset = self.execute('Any X WHERE X eid %(x)s', {'x': self.session.user.eid})
-        self.assertEquals(rset.description[0][0], 'EUser')
+        self.assertEquals(rset.description[0][0], 'CWUser')
         rset = self.execute('Any 1')
         self.assertEquals(rset.description[0][0], 'Int')
         rset = self.execute('Any TRUE')
@@ -202,7 +202,7 @@
 
     def test_encoding_pb(self):
         self.assertRaises(RQLSyntaxError, self.execute,
-                          'Any X WHERE X is ERType, X name "öwned_by"')
+                          'Any X WHERE X is CWRType, X name "öwned_by"')
 
     def test_unknown_eid(self):
         # should return an empty result set
@@ -211,20 +211,20 @@
     # selection queries tests #################################################
     
     def test_select_1(self):
-        rset = self.execute('Any X ORDERBY X WHERE X is EGroup')
+        rset = self.execute('Any X ORDERBY X WHERE X is CWGroup')
         result, descr = rset.rows, rset.description
         self.assertEquals(tuplify(result), [(1,), (2,), (3,), (4,)])
-        self.assertEquals(descr, [('EGroup',), ('EGroup',), ('EGroup',), ('EGroup',)])
+        self.assertEquals(descr, [('CWGroup',), ('CWGroup',), ('CWGroup',), ('CWGroup',)])
         
     def test_select_2(self):
-        rset = self.execute('Any X ORDERBY N WHERE X is EGroup, X name N')
+        rset = self.execute('Any X ORDERBY N WHERE X is CWGroup, X name N')
         self.assertEquals(tuplify(rset.rows), [(3,), (1,), (4,), (2,)])
-        self.assertEquals(rset.description, [('EGroup',), ('EGroup',), ('EGroup',), ('EGroup',)])
-        rset = self.execute('Any X ORDERBY N DESC WHERE X is EGroup, X name N')
+        self.assertEquals(rset.description, [('CWGroup',), ('CWGroup',), ('CWGroup',), ('CWGroup',)])
+        rset = self.execute('Any X ORDERBY N DESC WHERE X is CWGroup, X name N')
         self.assertEquals(tuplify(rset.rows), [(2,), (4,), (1,), (3,)])
         
     def test_select_3(self):
-        rset = self.execute('Any N GROUPBY N WHERE X is EGroup, X name N')
+        rset = self.execute('Any N GROUPBY N WHERE X is CWGroup, X name N')
         result, descr = rset.rows, rset.description
         result.sort()
         self.assertEquals(tuplify(result), [('guests',), ('managers',), ('owners',), ('users',)])
@@ -240,10 +240,10 @@
         result, descr = rset.rows, rset.description
         self.assertEquals(descr[0][0], 'String')
         self.assertEquals(descr[0][1], 'Int')
-        self.assertEquals(result[0][0], 'ENFRDef')
+        self.assertEquals(result[0][0], 'CWRelation')
         
     def test_select_groupby_orderby(self):
-        rset = self.execute('Any N GROUPBY N ORDERBY N WHERE X is EGroup, X name N')
+        rset = self.execute('Any N GROUPBY N ORDERBY N WHERE X is CWGroup, X name N')
         self.assertEquals(tuplify(rset.rows), [('guests',), ('managers',), ('owners',), ('users',)])
         self.assertEquals(rset.description, [('String',), ('String',), ('String',), ('String',)])
         
@@ -263,9 +263,9 @@
         self.assertEquals(len(rset), 5)
         
     def test_select_5(self):
-        rset = self.execute('Any X, TMP ORDERBY TMP WHERE X name TMP, X is EGroup')
+        rset = self.execute('Any X, TMP ORDERBY TMP WHERE X name TMP, X is CWGroup')
         self.assertEquals(tuplify(rset.rows), [(3, 'guests',), (1, 'managers',), (4, 'owners',), (2, 'users',)])
-        self.assertEquals(rset.description, [('EGroup', 'String',), ('EGroup', 'String',), ('EGroup', 'String',), ('EGroup', 'String',)])
+        self.assertEquals(rset.description, [('CWGroup', 'String',), ('CWGroup', 'String',), ('CWGroup', 'String',), ('CWGroup', 'String',)])
         
     def test_select_6(self):
         self.execute("INSERT Personne X: X nom 'bidule'")[0]
@@ -307,16 +307,16 @@
         self.execute("INSERT Personne X: X nom 'chouette'")
         self.execute("INSERT Personne X: X nom 'autre'")
         self.execute("SET X ecrit_par P WHERE X para 'bidule', P nom 'chouette'")
-        rset = self.execute('Any U,T ORDERBY T DESC WHERE U is EUser, '
+        rset = self.execute('Any U,T ORDERBY T DESC WHERE U is CWUser, '
                             'N ecrit_par U, N type T')#, {'x': self.ueid})
         self.assertEquals(len(rset.rows), 0)
         
     def test_select_nonregr_edition_not(self):
         groupeids = set((1, 2, 3))
-        groupreadperms = set(r[0] for r in self.execute('Any Y WHERE X name "EGroup", Y eid IN(1, 2, 3), X read_permission Y'))
-        rset = self.execute('DISTINCT Any Y WHERE X is EEType, X name "EGroup", Y eid IN(1, 2, 3), NOT X read_permission Y')
+        groupreadperms = set(r[0] for r in self.execute('Any Y WHERE X name "CWGroup", Y eid IN(1, 2, 3), X read_permission Y'))
+        rset = self.execute('DISTINCT Any Y WHERE X is CWEType, X name "CWGroup", Y eid IN(1, 2, 3), NOT X read_permission Y')
         self.assertEquals(sorted(r[0] for r in rset.rows), sorted(groupeids - groupreadperms))
-        rset = self.execute('DISTINCT Any Y WHERE X name "EGroup", Y eid IN(1, 2, 3), NOT X read_permission Y')
+        rset = self.execute('DISTINCT Any Y WHERE X name "CWGroup", Y eid IN(1, 2, 3), NOT X read_permission Y')
         self.assertEquals(sorted(r[0] for r in rset.rows), sorted(groupeids - groupreadperms))
                      
     def test_select_outer_join(self):
@@ -340,7 +340,7 @@
         self.assertEquals(rset.rows, [[peid1]])
 
     def test_select_left_outer_join(self):
-        ueid = self.execute("INSERT EUser X: X login 'bob', X upassword 'toto', X in_group G "
+        ueid = self.execute("INSERT CWUser X: X login 'bob', X upassword 'toto', X in_group G "
                             "WHERE G name 'users'")[0][0]
         self.commit()
         try:
@@ -359,13 +359,13 @@
                                 {'x': ueid}, 'x')
             self.assertEquals(len(rset), 2)
         finally:
-            self.execute('DELETE EUser X WHERE X eid %s' % ueid)
+            self.execute('DELETE CWUser X WHERE X eid %s' % ueid)
             self.commit()
 
     def test_select_ambigous_outer_join(self):
         teid = self.execute("INSERT Tag X: X name 'tag'")[0][0]
         self.execute("INSERT Tag X: X name 'tagbis'")[0][0]
-        geid = self.execute("EGroup G WHERE G name 'users'")[0][0]
+        geid = self.execute("CWGroup G WHERE G name 'users'")[0][0]
         self.execute("SET X tags Y WHERE X eid %(t)s, Y eid %(g)s",
                      {'g': geid, 't': teid}, 'g')
         rset = self.execute("Any GN,TN ORDERBY GN WHERE T? tags G, T name TN, G name GN")
@@ -423,13 +423,13 @@
         self.assertEquals(rset.description, [('Int',)])
 
     def test_select_custom_aggregat_concat_string(self):
-        rset = self.execute('Any CONCAT_STRINGS(N) WHERE X is EGroup, X name N')
+        rset = self.execute('Any CONCAT_STRINGS(N) WHERE X is CWGroup, X name N')
         self.failUnless(rset)
         self.failUnlessEqual(sorted(rset[0][0].split(', ')), ['guests', 'managers',
                                                              'owners', 'users'])
 
     def test_select_custom_regproc_limit_size(self):
-        rset = self.execute('Any TEXT_LIMIT_SIZE(N, 3) WHERE X is EGroup, X name N, X name "managers"')
+        rset = self.execute('Any TEXT_LIMIT_SIZE(N, 3) WHERE X is CWGroup, X name N, X name "managers"')
         self.failUnless(rset)
         self.failUnlessEqual(rset[0][0], 'man...')
         self.execute("INSERT Basket X: X name 'bidule', X description '<b>hop hop</b>', X description_format 'text/html'")
@@ -438,10 +438,10 @@
         self.failUnlessEqual(rset[0][0], 'hop...')
 
     def test_select_regproc_orderby(self):
-        rset = self.execute('DISTINCT Any X,N ORDERBY GROUP_SORT_VALUE(N) WHERE X is EGroup, X name N, X name "managers"')
+        rset = self.execute('DISTINCT Any X,N ORDERBY GROUP_SORT_VALUE(N) WHERE X is CWGroup, X name N, X name "managers"')
         self.failUnlessEqual(len(rset), 1)
         self.failUnlessEqual(rset[0][1], 'managers')
-        rset = self.execute('Any X,N ORDERBY GROUP_SORT_VALUE(N) WHERE X is EGroup, X name N, NOT U in_group X, U login "admin"')
+        rset = self.execute('Any X,N ORDERBY GROUP_SORT_VALUE(N) WHERE X is CWGroup, X name N, NOT U in_group X, U login "admin"')
         self.failUnlessEqual(len(rset), 3)
         self.failUnlessEqual(rset[0][1], 'owners')
         
@@ -449,7 +449,7 @@
         rset = self.execute('Any G, COUNT(U) GROUPBY G ORDERBY 2 WHERE U in_group G')
         self.assertEquals(len(rset.rows), 2)
         self.assertEquals(len(rset.rows[0]), 2)
-        self.assertEquals(rset.description[0], ('EGroup', 'Int',))
+        self.assertEquals(rset.description[0], ('CWGroup', 'Int',))
 
     def test_select_aggregat_having(self):
         rset = self.execute('Any N,COUNT(RDEF) GROUPBY N ORDERBY 2,N '
@@ -477,12 +477,12 @@
         self.assertEquals(tuplify(result), [(1,), (2,), (3,), (4,), (5,)])
         
     def test_select_upper(self):
-        rset = self.execute('Any X, UPPER(L) ORDERBY L WHERE X is EUser, X login L')
+        rset = self.execute('Any X, UPPER(L) ORDERBY L WHERE X is CWUser, X login L')
         self.assertEquals(len(rset.rows), 2)
         self.assertEquals(rset.rows[0][1], 'ADMIN')
-        self.assertEquals(rset.description[0], ('EUser', 'String',))
+        self.assertEquals(rset.description[0], ('CWUser', 'String',))
         self.assertEquals(rset.rows[1][1], 'ANON')
-        self.assertEquals(rset.description[1], ('EUser', 'String',))
+        self.assertEquals(rset.description[1], ('CWUser', 'String',))
         eid = rset.rows[0][0]
         rset = self.execute('Any UPPER(L) WHERE X eid %s, X login L'%eid)
         self.assertEquals(rset.rows[0][0], 'ADMIN')
@@ -538,16 +538,16 @@
         self.assertEquals(len(rset.rows), 1, rset.rows)
         
     def test_select_no_descr(self):
-        rset = self.execute('Any X WHERE X is EGroup', build_descr=0)
+        rset = self.execute('Any X WHERE X is CWGroup', build_descr=0)
         rset.rows.sort()
         self.assertEquals(tuplify(rset.rows), [(1,), (2,), (3,), (4,)])
         self.assertEquals(rset.description, ())
 
     def test_select_limit_offset(self):
-        rset = self.execute('EGroup X ORDERBY N LIMIT 2 WHERE X name N')
+        rset = self.execute('CWGroup X ORDERBY N LIMIT 2 WHERE X name N')
         self.assertEquals(tuplify(rset.rows), [(3,), (1,)])
-        self.assertEquals(rset.description, [('EGroup',), ('EGroup',)])
-        rset = self.execute('EGroup X ORDERBY N LIMIT 2 OFFSET 2 WHERE X name N')
+        self.assertEquals(rset.description, [('CWGroup',), ('CWGroup',)])
+        rset = self.execute('CWGroup X ORDERBY N LIMIT 2 OFFSET 2 WHERE X name N')
         self.assertEquals(tuplify(rset.rows), [(4,), (2,)])
         
     def test_select_symetric(self):
@@ -637,7 +637,7 @@
         self.assertEqual(rset.rows, [['abcd'], ['important'], ['minor'], ['normal'], ['zou']])
         
     def test_select_ordered_distinct_3(self):
-        rset = self.execute('DISTINCT Any N ORDERBY GROUP_SORT_VALUE(N) WHERE X is EGroup, X name N')
+        rset = self.execute('DISTINCT Any N ORDERBY GROUP_SORT_VALUE(N) WHERE X is CWGroup, X name N')
         self.assertEqual(rset.rows, [['owners'], ['guests'], ['users'], ['managers']])
 
     def test_select_or_value(self):
@@ -674,7 +674,7 @@
         self.assertEqual(len(rset.rows), 2)
 
     def test_select_boolean(self):
-        rset = self.execute('Any N WHERE X is EEType, X name N, X final %(val)s',
+        rset = self.execute('Any N WHERE X is CWEType, X name N, X final %(val)s',
                             {'val': True})
         self.assertEquals(sorted(r[0] for r in rset.rows), ['Boolean', 'Bytes',
                                                             'Date', 'Datetime',
@@ -682,7 +682,7 @@
                                                             'Int', 'Interval',
                                                             'Password', 'String',
                                                             'Time'])
-        rset = self.execute('Any N WHERE X is EEType, X name N, X final TRUE')
+        rset = self.execute('Any N WHERE X is CWEType, X name N, X final TRUE')
         self.assertEquals(sorted(r[0] for r in rset.rows), ['Boolean', 'Bytes',
                                                             'Date', 'Datetime',
                                                             'Decimal', 'Float',
@@ -691,28 +691,28 @@
                                                             'Time'])
         
     def test_select_constant(self):
-        rset = self.execute('Any X, "toto" ORDERBY X WHERE X is EGroup')
+        rset = self.execute('Any X, "toto" ORDERBY X WHERE X is CWGroup')
         self.assertEquals(rset.rows,
                           map(list, zip((1,2,3,4), ('toto','toto','toto','toto',))))
         self.assertIsInstance(rset[0][1], unicode)
         self.assertEquals(rset.description,
-                          zip(('EGroup', 'EGroup', 'EGroup', 'EGroup'),
+                          zip(('CWGroup', 'CWGroup', 'CWGroup', 'CWGroup'),
                               ('String', 'String', 'String', 'String',)))
-        rset = self.execute('Any X, %(value)s ORDERBY X WHERE X is EGroup', {'value': 'toto'})
+        rset = self.execute('Any X, %(value)s ORDERBY X WHERE X is CWGroup', {'value': 'toto'})
         self.assertEquals(rset.rows,
                           map(list, zip((1,2,3,4), ('toto','toto','toto','toto',))))
         self.assertIsInstance(rset[0][1], unicode)
         self.assertEquals(rset.description,
-                          zip(('EGroup', 'EGroup', 'EGroup', 'EGroup'),
+                          zip(('CWGroup', 'CWGroup', 'CWGroup', 'CWGroup'),
                               ('String', 'String', 'String', 'String',)))
-        rset = self.execute('Any X,GN WHERE X is EUser, G is EGroup, X login "syt", X in_group G, G name GN')
+        rset = self.execute('Any X,GN WHERE X is CWUser, G is CWGroup, X login "syt", X in_group G, G name GN')
 
     def test_select_union(self):
         rset = self.execute('Any X,N ORDERBY N WITH X,N BEING '
                             '((Any X,N WHERE X name N, X transition_of E, E name %(name)s)'
                             ' UNION '
                             '(Any X,N WHERE X name N, X state_of E, E name %(name)s))',
-                            {'name': 'EUser'})
+                            {'name': 'CWUser'})
         self.assertEquals([x[1] for x in rset.rows],
                           ['activate', 'activated', 'deactivate', 'deactivated'])
         self.assertEquals(rset.description,
@@ -748,7 +748,7 @@
                            'start', 'todo'])
         
     def test_exists(self):
-        geid = self.execute("INSERT EGroup X: X name 'lulufanclub'")[0][0]
+        geid = self.execute("INSERT CWGroup X: X name 'lulufanclub'")[0][0]
         self.execute("SET U in_group G WHERE G name 'lulufanclub'")
         peid = self.execute("INSERT Personne X: X prenom 'lulu', X nom 'petit'")[0][0]
         rset = self.execute("Any X WHERE X prenom 'lulu',"
@@ -764,7 +764,7 @@
         self.assertEquals(login, 'admin')
 
     def test_select_date_mathexp(self):
-        rset = self.execute('Any X, TODAY - CD WHERE X is EUser, X creation_date CD')
+        rset = self.execute('Any X, TODAY - CD WHERE X is CWUser, X creation_date CD')
         self.failUnless(rset)
         self.failUnlessEqual(rset.description[0][1], 'Interval')
         eid, = self.execute("INSERT Personne X: X nom 'bidule'")[0]
@@ -776,7 +776,7 @@
         self.execute('SET X in_group G WHERE G name "users"')
         rset = self.execute('Any GN, COUNT(X)*100/T GROUPBY GN ORDERBY 2,1'
                             ' WHERE G name GN, X in_group G'
-                            ' WITH T BEING (Any COUNT(U) WHERE U is EUser)')
+                            ' WITH T BEING (Any COUNT(U) WHERE U is CWUser)')
         self.assertEquals(rset.rows, [[u'guests', 50], [u'managers', 50], [u'users', 100]])
         self.assertEquals(rset.description, [('String', 'Int'), ('String', 'Int'), ('String', 'Int')])
 
@@ -884,13 +884,13 @@
 
         self.assertRaises(QueryError,
                           self.execute,
-                          "INSERT EUser X: X login 'toto', X eid %s" % cnx.user(self.session).eid)
+                          "INSERT CWUser X: X login 'toto', X eid %s" % cnx.user(self.session).eid)
 
     def test_insertion_description_with_where(self):
-        rset = self.execute('INSERT EUser E, EmailAddress EM: E login "X", E upassword "X", '
+        rset = self.execute('INSERT CWUser E, EmailAddress EM: E login "X", E upassword "X", '
                             'E primary_email EM, EM address "X", E in_group G '
                             'WHERE G name "managers"')
-        self.assertEquals(list(rset.description[0]), ['EUser', 'EmailAddress'])
+        self.assertEquals(list(rset.description[0]), ['CWUser', 'EmailAddress'])
     
     # deletion queries tests ##################################################
 
@@ -1027,7 +1027,7 @@
         self.assertEquals(self.execute('Any X WHERE X nom "tutu"').rows, [[peid2]])
 
     def test_update_multiple2(self):
-        ueid = self.execute("INSERT EUser X: X login 'bob', X upassword 'toto'")[0][0]
+        ueid = self.execute("INSERT CWUser X: X login 'bob', X upassword 'toto'")[0][0]
         peid1 = self.execute("INSERT Personne Y: Y nom 'turlu'")[0][0]
         peid2 = self.execute("INSERT Personne Y: Y nom 'tutu'")[0][0]
         self.execute('SET P1 owned_by U, P2 owned_by U '
@@ -1065,33 +1065,33 @@
     # upassword encryption tests #################################################
     
     def test_insert_upassword(self):
-        rset = self.execute("INSERT EUser X: X login 'bob', X upassword 'toto'")
+        rset = self.execute("INSERT CWUser X: X login 'bob', X upassword 'toto'")
         self.assertEquals(len(rset.rows), 1)
-        self.assertEquals(rset.description, [('EUser',)])
+        self.assertEquals(rset.description, [('CWUser',)])
         self.assertRaises(Unauthorized,
-                          self.execute, "Any P WHERE X is EUser, X login 'bob', X upassword P")
+                          self.execute, "Any P WHERE X is CWUser, X login 'bob', X upassword P")
         cursor = self.pool['system']
-        cursor.execute("SELECT %supassword from %sEUser WHERE %slogin='bob'"
+        cursor.execute("SELECT %supassword from %sCWUser WHERE %slogin='bob'"
                        % (SQL_PREFIX, SQL_PREFIX, SQL_PREFIX))
         passwd = cursor.fetchone()[0].getvalue()
         self.assertEquals(passwd, crypt_password('toto', passwd[:2])) 
-        rset = self.execute("Any X WHERE X is EUser, X login 'bob', X upassword '%s'" % passwd)
+        rset = self.execute("Any X WHERE X is CWUser, X login 'bob', X upassword '%s'" % passwd)
         self.assertEquals(len(rset.rows), 1)
-        self.assertEquals(rset.description, [('EUser',)])
+        self.assertEquals(rset.description, [('CWUser',)])
         
     def test_update_upassword(self):
         cursor = self.pool['system']
-        rset = self.execute("INSERT EUser X: X login 'bob', X upassword %(pwd)s", {'pwd': 'toto'})
-        self.assertEquals(rset.description[0][0], 'EUser')
-        rset = self.execute("SET X upassword %(pwd)s WHERE X is EUser, X login 'bob'",
+        rset = self.execute("INSERT CWUser X: X login 'bob', X upassword %(pwd)s", {'pwd': 'toto'})
+        self.assertEquals(rset.description[0][0], 'CWUser')
+        rset = self.execute("SET X upassword %(pwd)s WHERE X is CWUser, X login 'bob'",
                             {'pwd': 'tutu'})
-        cursor.execute("SELECT %supassword from %sEUser WHERE %slogin='bob'"
+        cursor.execute("SELECT %supassword from %sCWUser WHERE %slogin='bob'"
                        % (SQL_PREFIX, SQL_PREFIX, SQL_PREFIX))
         passwd = cursor.fetchone()[0].getvalue()
         self.assertEquals(passwd, crypt_password('tutu', passwd[:2])) 
-        rset = self.execute("Any X WHERE X is EUser, X login 'bob', X upassword '%s'" % passwd)
+        rset = self.execute("Any X WHERE X is CWUser, X login 'bob', X upassword '%s'" % passwd)
         self.assertEquals(len(rset.rows), 1)
-        self.assertEquals(rset.description, [('EUser',)])
+        self.assertEquals(rset.description, [('CWUser',)])
 
     # non regression tests ####################################################
     
@@ -1107,7 +1107,7 @@
 
     def test_nonregr_2(self):
         teid = self.execute("INSERT Tag X: X name 'tag'")[0][0]
-        geid = self.execute("EGroup G WHERE G name 'users'")[0][0]
+        geid = self.execute("CWGroup G WHERE G name 'users'")[0][0]
         self.execute("SET X tags Y WHERE X eid %(t)s, Y eid %(g)s",
                        {'g': geid, 't': teid})
         rset = self.execute('Any X WHERE E eid %(x)s, E tags X',
@@ -1118,7 +1118,7 @@
         """bad sql generated on the second query (destination_state is not
         detected as an inlined relation)
         """
-        rset = self.execute('Any S,ES,T WHERE S state_of ET, ET name "EUser",'
+        rset = self.execute('Any S,ES,T WHERE S state_of ET, ET name "CWUser",'
                              'ES allowed_transition T, T destination_state S')
         self.assertEquals(len(rset.rows), 2)
 
@@ -1127,7 +1127,7 @@
         # union queries and that make for instance a 266Ko sql query which is refused
         # by the server (or client lib)
         rset = self.execute('Any ER,SE,OE WHERE SE name "Comment", ER name "comments", OE name "Comment",'
-                            'ER is ERType, SE is EEType, OE is EEType')
+                            'ER is CWRType, SE is CWEType, OE is CWEType')
         self.assertEquals(len(rset), 1)
 
     def test_nonregr_5(self):
@@ -1246,16 +1246,16 @@
         self.execute('SET X creation_date %(date)s WHERE X eid 1', {'date': date.today()})
 
     def test_nonregr_set_query(self):
-        ueid = self.execute("INSERT EUser X: X login 'bob', X upassword 'toto'")[0][0]
+        ueid = self.execute("INSERT CWUser X: X login 'bob', X upassword 'toto'")[0][0]
         self.execute("SET E in_group G, E in_state S, "
                       "E firstname %(firstname)s, E surname %(surname)s "
                       "WHERE E eid %(x)s, G name 'users', S name 'activated'",
                       {'x':ueid, 'firstname': u'jean', 'surname': u'paul'}, 'x')
         
     def test_nonregr_u_owned_by_u(self):
-        ueid = self.execute("INSERT EUser X: X login 'bob', X upassword 'toto', X in_group G "
+        ueid = self.execute("INSERT CWUser X: X login 'bob', X upassword 'toto', X in_group G "
                              "WHERE G name 'users'")[0][0]
-        rset = self.execute("EUser U")
+        rset = self.execute("CWUser U")
         self.assertEquals(len(rset), 3) # bob + admin + anon
         rset = self.execute("Any U WHERE NOT U owned_by U")
         self.assertEquals(len(rset), 0) # even admin created at repo initialization time should belong to itself
@@ -1265,18 +1265,18 @@
         self.execute("SET X description D WHERE X is State, X description D")
 
     def test_nonregr_is(self):
-        uteid = self.execute('Any ET WHERE ET name "EUser"')[0][0]
+        uteid = self.execute('Any ET WHERE ET name "CWUser"')[0][0]
         self.execute('Any X, ET WHERE X is ET, ET eid %s' % uteid)
 
     def test_nonregr_orderby(self):
         seid = self.execute('Any X WHERE X name "activated"')[0][0]
-        self.execute('Any X,S, MAX(T) GROUPBY X,S ORDERBY S WHERE X is EUser, T tags X, S eid IN(%s), X in_state S' % seid)
+        self.execute('Any X,S, MAX(T) GROUPBY X,S ORDERBY S WHERE X is CWUser, T tags X, S eid IN(%s), X in_state S' % seid)
 
     def test_nonregr_solution_cache(self):
         self.skip('XXX should be fixed or documented') # (doesn't occur if cache key is provided.)
-        rset = self.execute('Any X WHERE X is EUser, X eid %(x)s', {'x':self.ueid})
+        rset = self.execute('Any X WHERE X is CWUser, X eid %(x)s', {'x':self.ueid})
         self.assertEquals(len(rset), 1)
-        rset = self.execute('Any X WHERE X is EUser, X eid %(x)s', {'x':12345})
+        rset = self.execute('Any X WHERE X is CWUser, X eid %(x)s', {'x':12345})
         self.assertEquals(len(rset), 0)
 
     def test_nonregr_final_norestr(self):
--- a/server/test/unittest_repository.py	Fri Apr 17 13:21:05 2009 +0200
+++ b/server/test/unittest_repository.py	Fri Apr 17 16:55:37 2009 +0200
@@ -46,7 +46,7 @@
         self.repo.config._cubes = None # avoid assertion error
         self.repo.fill_schema()
         pool = self.repo._get_pool()
-        table = SQL_PREFIX + 'EEType'
+        table = SQL_PREFIX + 'CWEType'
         namecol = SQL_PREFIX + 'name'
         finalcol = SQL_PREFIX + 'final'
         try:
@@ -68,12 +68,12 @@
     def test_schema_has_owner(self):
         repo = self.repo
         cnxid = repo.connect(*self.default_user_password())
-        self.failIf(repo.execute(cnxid, 'EEType X WHERE NOT X owned_by U'))
-        self.failIf(repo.execute(cnxid, 'ERType X WHERE NOT X owned_by U'))
-        self.failIf(repo.execute(cnxid, 'EFRDef X WHERE NOT X owned_by U'))
-        self.failIf(repo.execute(cnxid, 'ENFRDef X WHERE NOT X owned_by U'))
-        self.failIf(repo.execute(cnxid, 'EConstraint X WHERE NOT X owned_by U'))
-        self.failIf(repo.execute(cnxid, 'EConstraintType X WHERE NOT X owned_by U'))
+        self.failIf(repo.execute(cnxid, 'CWEType X WHERE NOT X owned_by U'))
+        self.failIf(repo.execute(cnxid, 'CWRType X WHERE NOT X owned_by U'))
+        self.failIf(repo.execute(cnxid, 'CWAttribute X WHERE NOT X owned_by U'))
+        self.failIf(repo.execute(cnxid, 'CWRelation X WHERE NOT X owned_by U'))
+        self.failIf(repo.execute(cnxid, 'CWConstraint X WHERE NOT X owned_by U'))
+        self.failIf(repo.execute(cnxid, 'CWConstraintType X WHERE NOT X owned_by U'))
         
     def test_connect(self):
         login, passwd = self.default_user_password()
@@ -97,7 +97,7 @@
     def test_login_upassword_accent(self):
         repo = self.repo
         cnxid = repo.connect(*self.default_user_password())
-        repo.execute(cnxid, 'INSERT EUser X: X login %(login)s, X upassword %(passwd)s, X in_state S, X in_group G WHERE S name "activated", G name "users"',
+        repo.execute(cnxid, 'INSERT CWUser X: X login %(login)s, X upassword %(passwd)s, X in_state S, X in_group G WHERE S name "activated", G name "users"',
                      {'login': u"barnabé", 'passwd': u"héhéhé".encode('UTF8')})
         repo.commit(cnxid)
         repo.close(cnxid)
@@ -106,10 +106,10 @@
     def test_invalid_entity_rollback(self):
         repo = self.repo
         cnxid = repo.connect(*self.default_user_password())
-        repo.execute(cnxid, 'INSERT EUser X: X login %(login)s, X upassword %(passwd)s, X in_state S WHERE S name "activated"',
+        repo.execute(cnxid, 'INSERT CWUser X: X login %(login)s, X upassword %(passwd)s, X in_state S WHERE S name "activated"',
                      {'login': u"tutetute", 'passwd': 'tutetute'})
         self.assertRaises(ValidationError, repo.commit, cnxid)
-        rset = repo.execute(cnxid, 'EUser X WHERE X login "tutetute"')
+        rset = repo.execute(cnxid, 'CWUser X WHERE X login "tutetute"')
         self.assertEquals(rset.rowcount, 0)
         
     def test_close(self):
@@ -201,7 +201,7 @@
     def test_initial_schema(self):
         schema = self.repo.schema
         # check order of attributes is respected
-        self.assertListEquals([r.type for r in schema.eschema('EFRDef').ordered_relations()
+        self.assertListEquals([r.type for r in schema.eschema('CWAttribute').ordered_relations()
                                if not r.type in ('eid', 'is', 'is_instance_of', 'identity', 
                                                  'creation_date', 'modification_date',
                                                  'owned_by', 'created_by')],
@@ -210,10 +210,10 @@
                                'indexed', 'fulltextindexed', 'internationalizable',
                                'defaultval', 'description_format', 'description'])
 
-        self.assertEquals(schema.eschema('EEType').main_attribute(), 'name')
+        self.assertEquals(schema.eschema('CWEType').main_attribute(), 'name')
         self.assertEquals(schema.eschema('State').main_attribute(), 'name')
 
-        constraints = schema.rschema('name').rproperty('EEType', 'String', 'constraints')
+        constraints = schema.rschema('name').rproperty('CWEType', 'String', 'constraints')
         self.assertEquals(len(constraints), 2)
         for cstr in constraints[:]:
             if isinstance(cstr, UniqueConstraint):
@@ -225,14 +225,14 @@
         self.assertEquals(sizeconstraint.min, None)
         self.assertEquals(sizeconstraint.max, 64)
 
-        constraints = schema.rschema('relation_type').rproperty('EFRDef', 'ERType', 'constraints')
+        constraints = schema.rschema('relation_type').rproperty('CWAttribute', 'CWRType', 'constraints')
         self.assertEquals(len(constraints), 1)
         cstr = constraints[0]
         self.assert_(isinstance(cstr, RQLConstraint))
         self.assertEquals(cstr.restriction, 'O final TRUE')
 
         ownedby = schema.rschema('owned_by')
-        self.assertEquals(ownedby.objects('EEType'), ('EUser',))
+        self.assertEquals(ownedby.objects('CWEType'), ('CWUser',))
 
     def test_pyro(self):
         import Pyro
@@ -267,8 +267,8 @@
         repo = self.repo
         cnxid = repo.connect(*self.default_user_password())
         session = repo._get_session(cnxid, setpool=True)
-        self.assertEquals(repo.type_and_source_from_eid(1, session), ('EGroup', 'system', None))
-        self.assertEquals(repo.type_from_eid(1, session), 'EGroup')
+        self.assertEquals(repo.type_and_source_from_eid(1, session), ('CWGroup', 'system', None))
+        self.assertEquals(repo.type_from_eid(1, session), 'CWGroup')
         self.assertEquals(repo.source_from_eid(1, session).uri, 'system')
         self.assertEquals(repo.eid2extid(repo.system_source, 1, session), None)
         class dummysource: uri = 'toto'
@@ -278,13 +278,13 @@
         self.assertEquals(self.repo.get_schema(), self.repo.schema)
         self.assertEquals(self.repo.source_defs(), {'system': {'adapter': 'native', 'uri': 'system'}})
         # .properties() return a result set
-        self.assertEquals(self.repo.properties().rql, 'Any K,V WHERE P is EProperty,P pkey K, P value V, NOT P for_user U')
+        self.assertEquals(self.repo.properties().rql, 'Any K,V WHERE P is CWProperty,P pkey K, P value V, NOT P for_user U')
 
     def test_session_api(self):
         repo = self.repo
         cnxid = repo.connect(*self.default_user_password())
         self.assertEquals(repo.user_info(cnxid), (5, 'admin', set([u'managers']), {}))
-        self.assertEquals(repo.describe(cnxid, 1), (u'EGroup', u'system', None))
+        self.assertEquals(repo.describe(cnxid, 1), (u'CWGroup', u'system', None))
         repo.close(cnxid)
         self.assertRaises(BadConnectionId, repo.user_info, cnxid)
         self.assertRaises(BadConnectionId, repo.describe, cnxid, 1)
@@ -325,7 +325,7 @@
         self.assertRaises(UnknownEid, self.repo.source_from_eid, -2, self.session)
 
     def test_type_from_eid(self):
-        self.assertEquals(self.repo.type_from_eid(1, self.session), 'EGroup')
+        self.assertEquals(self.repo.type_from_eid(1, self.session), 'CWGroup')
         
     def test_type_from_eid_raise(self):
         self.assertRaises(UnknownEid, self.repo.type_from_eid, -2, self.session)
@@ -449,7 +449,7 @@
         """make sure after_<event>_relation hooks are deferred"""
         self.hm.register_hook(self._after_relation_hook,
                              'after_add_relation', 'in_state')
-        eidp = self.execute('INSERT EUser X: X login "toto", X upassword "tutu", X in_state S WHERE S name "activated"')[0][0]
+        eidp = self.execute('INSERT CWUser X: X login "toto", X upassword "tutu", X in_state S WHERE S name "activated"')[0][0]
         eids = self.execute('State X WHERE X name "activated"')[0][0]
         self.assertEquals(self.called, [(eidp, 'in_state', eids,)])
     
--- a/server/test/unittest_rql2sql.py	Fri Apr 17 13:21:05 2009 +0200
+++ b/server/test/unittest_rql2sql.py	Fri Apr 17 16:55:37 2009 +0200
@@ -121,14 +121,14 @@
 FROM cw_Affaire AS X
 WHERE DATE(X.cw_creation_date)=CURRENT_DATE'''),
 
-    ("Any N WHERE G is EGroup, G name N, E eid 12, E read_permission G",
+    ("Any N WHERE G is CWGroup, G name N, E eid 12, E read_permission G",
      '''SELECT G.cw_name
-FROM cw_EGroup AS G, read_permission_relation AS rel_read_permission0
+FROM cw_CWGroup AS G, read_permission_relation AS rel_read_permission0
 WHERE rel_read_permission0.eid_from=12 AND rel_read_permission0.eid_to=G.cw_eid'''),
 
     ('Any Y WHERE U login "admin", U login Y', # stupid but valid...
      """SELECT U.cw_login
-FROM cw_EUser AS U
+FROM cw_CWUser AS U
 WHERE U.cw_login=admin"""),
 
     ('Any T WHERE T tags X, X is State',
@@ -145,13 +145,13 @@
      "EXISTS(X owned_by U, U in_group G, G name 'lulufanclub' OR G name 'managers');",
      '''SELECT X.cw_eid
 FROM cw_Personne AS X
-WHERE X.cw_prenom=lulu AND EXISTS(SELECT 1 FROM owned_by_relation AS rel_owned_by0, in_group_relation AS rel_in_group1, cw_EGroup AS G WHERE rel_owned_by0.eid_from=X.cw_eid AND rel_in_group1.eid_from=rel_owned_by0.eid_to AND rel_in_group1.eid_to=G.cw_eid AND ((G.cw_name=lulufanclub) OR (G.cw_name=managers)))'''),
+WHERE X.cw_prenom=lulu AND EXISTS(SELECT 1 FROM owned_by_relation AS rel_owned_by0, in_group_relation AS rel_in_group1, cw_CWGroup AS G WHERE rel_owned_by0.eid_from=X.cw_eid AND rel_in_group1.eid_from=rel_owned_by0.eid_to AND rel_in_group1.eid_to=G.cw_eid AND ((G.cw_name=lulufanclub) OR (G.cw_name=managers)))'''),
 
     ("Any X WHERE X prenom 'lulu',"
      "NOT EXISTS(X owned_by U, U in_group G, G name 'lulufanclub' OR G name 'managers');",
      '''SELECT X.cw_eid
 FROM cw_Personne AS X
-WHERE X.cw_prenom=lulu AND NOT EXISTS(SELECT 1 FROM owned_by_relation AS rel_owned_by0, in_group_relation AS rel_in_group1, cw_EGroup AS G WHERE rel_owned_by0.eid_from=X.cw_eid AND rel_in_group1.eid_from=rel_owned_by0.eid_to AND rel_in_group1.eid_to=G.cw_eid AND ((G.cw_name=lulufanclub) OR (G.cw_name=managers)))'''),
+WHERE X.cw_prenom=lulu AND NOT EXISTS(SELECT 1 FROM owned_by_relation AS rel_owned_by0, in_group_relation AS rel_in_group1, cw_CWGroup AS G WHERE rel_owned_by0.eid_from=X.cw_eid AND rel_in_group1.eid_from=rel_owned_by0.eid_to AND rel_in_group1.eid_to=G.cw_eid AND ((G.cw_name=lulufanclub) OR (G.cw_name=managers)))'''),
 ]
 
 ADVANCED= [
@@ -234,11 +234,11 @@
     
     ('Any SEN,RN,OEN WHERE X from_entity SE, SE eid 44, X relation_type R, R eid 139, X to_entity OE, OE eid 42, R name RN, SE name SEN, OE name OEN',
      '''SELECT SE.cw_name, R.cw_name, OE.cw_name
-FROM cw_EEType AS OE, cw_EEType AS SE, cw_EFRDef AS X, cw_ERType AS R
+FROM cw_CWEType AS OE, cw_CWEType AS SE, cw_CWAttribute AS X, cw_CWRType AS R
 WHERE X.cw_from_entity=44 AND SE.cw_eid=44 AND X.cw_relation_type=139 AND R.cw_eid=139 AND X.cw_to_entity=42 AND OE.cw_eid=42
 UNION ALL
 SELECT SE.cw_name, R.cw_name, OE.cw_name
-FROM cw_EEType AS OE, cw_EEType AS SE, cw_ENFRDef AS X, cw_ERType AS R
+FROM cw_CWEType AS OE, cw_CWEType AS SE, cw_CWRelation AS X, cw_CWRType AS R
 WHERE X.cw_from_entity=44 AND SE.cw_eid=44 AND X.cw_relation_type=139 AND R.cw_eid=139 AND X.cw_to_entity=42 AND OE.cw_eid=42'''),
 
     # Any O WHERE NOT S corrected_in O, S eid %(x)s, S concerns P, O version_of P, O in_state ST, NOT ST name "published", O modification_date MTIME ORDERBY MTIME DESC LIMIT 9
@@ -272,8 +272,8 @@
 
     ('Any GN WHERE X in_group G, G name GN, (G name "managers" OR EXISTS(X copain T, T login in ("comme", "cochon")))',
      '''SELECT G.cw_name
-FROM cw_EGroup AS G, in_group_relation AS rel_in_group0
-WHERE rel_in_group0.eid_to=G.cw_eid AND ((G.cw_name=managers) OR (EXISTS(SELECT 1 FROM copain_relation AS rel_copain1, cw_EUser AS T WHERE rel_copain1.eid_from=rel_in_group0.eid_from AND rel_copain1.eid_to=T.cw_eid AND T.cw_login IN(comme, cochon))))'''),
+FROM cw_CWGroup AS G, in_group_relation AS rel_in_group0
+WHERE rel_in_group0.eid_to=G.cw_eid AND ((G.cw_name=managers) OR (EXISTS(SELECT 1 FROM copain_relation AS rel_copain1, cw_CWUser AS T WHERE rel_copain1.eid_from=rel_in_group0.eid_from AND rel_copain1.eid_to=T.cw_eid AND T.cw_login IN(comme, cochon))))'''),
 
     ('Any C WHERE C is Card, EXISTS(X documented_by C)',
       """SELECT C.cw_eid
@@ -292,12 +292,12 @@
 
     ('Any GN,L WHERE X in_group G, X login L, G name GN, EXISTS(X copain T, T login L, T login IN("comme", "cochon"))',
      '''SELECT G.cw_name, X.cw_login
-FROM cw_EGroup AS G, cw_EUser AS X, in_group_relation AS rel_in_group0
-WHERE rel_in_group0.eid_from=X.cw_eid AND rel_in_group0.eid_to=G.cw_eid AND EXISTS(SELECT 1 FROM copain_relation AS rel_copain1, cw_EUser AS T WHERE rel_copain1.eid_from=X.cw_eid AND rel_copain1.eid_to=T.cw_eid AND T.cw_login=X.cw_login AND T.cw_login IN(comme, cochon))'''),
+FROM cw_CWGroup AS G, cw_CWUser AS X, in_group_relation AS rel_in_group0
+WHERE rel_in_group0.eid_from=X.cw_eid AND rel_in_group0.eid_to=G.cw_eid AND EXISTS(SELECT 1 FROM copain_relation AS rel_copain1, cw_CWUser AS T WHERE rel_copain1.eid_from=X.cw_eid AND rel_copain1.eid_to=T.cw_eid AND T.cw_login=X.cw_login AND T.cw_login IN(comme, cochon))'''),
 
-    ('Any X,S, MAX(T) GROUPBY X,S ORDERBY S WHERE X is EUser, T tags X, S eid IN(32), X in_state S',
+    ('Any X,S, MAX(T) GROUPBY X,S ORDERBY S WHERE X is CWUser, T tags X, S eid IN(32), X in_state S',
      '''SELECT X.cw_eid, 32, MAX(rel_tags0.eid_from)
-FROM cw_EUser AS X, tags_relation AS rel_tags0
+FROM cw_CWUser AS X, tags_relation AS rel_tags0
 WHERE rel_tags0.eid_to=X.cw_eid AND X.cw_in_state=32
 GROUP BY X.cw_eid'''),
 
@@ -309,24 +309,24 @@
 ORDER BY 1 DESC
 LIMIT 10'''),
 
-    ('Any X WHERE Y evaluee X, Y is EUser',
+    ('Any X WHERE Y evaluee X, Y is CWUser',
      '''SELECT rel_evaluee0.eid_to
-FROM cw_EUser AS Y, evaluee_relation AS rel_evaluee0
+FROM cw_CWUser AS Y, evaluee_relation AS rel_evaluee0
 WHERE rel_evaluee0.eid_from=Y.cw_eid'''),
 
     ('Any L WHERE X login "admin", X identity Y, Y login L',
      '''SELECT Y.cw_login
-FROM cw_EUser AS X, cw_EUser AS Y
+FROM cw_CWUser AS X, cw_CWUser AS Y
 WHERE X.cw_login=admin AND X.cw_eid=Y.cw_eid'''),
 
     ('Any L WHERE X login "admin", NOT X identity Y, Y login L',
      '''SELECT Y.cw_login
-FROM cw_EUser AS X, cw_EUser AS Y
+FROM cw_CWUser AS X, cw_CWUser AS Y
 WHERE X.cw_login=admin AND NOT X.cw_eid=Y.cw_eid'''),
     
     ('Any L WHERE X login "admin", X identity Y?, Y login L',
      '''SELECT Y.cw_login
-FROM cw_EUser AS X LEFT OUTER JOIN cw_EUser AS Y ON (X.cw_eid=Y.cw_eid)
+FROM cw_CWUser AS X LEFT OUTER JOIN cw_CWUser AS Y ON (X.cw_eid=Y.cw_eid)
 WHERE X.cw_login=admin'''),
 
     ('Any XN ORDERBY XN WHERE X name XN',
@@ -334,22 +334,22 @@
 FROM cw_Basket AS X
 UNION ALL
 SELECT X.cw_name
-FROM cw_ECache AS X
+FROM cw_CWCache AS X
 UNION ALL
 SELECT X.cw_name
-FROM cw_EConstraintType AS X
+FROM cw_CWConstraintType AS X
 UNION ALL
 SELECT X.cw_name
-FROM cw_EEType AS X
+FROM cw_CWEType AS X
 UNION ALL
 SELECT X.cw_name
-FROM cw_EGroup AS X
+FROM cw_CWGroup AS X
 UNION ALL
 SELECT X.cw_name
-FROM cw_EPermission AS X
+FROM cw_CWPermission AS X
 UNION ALL
 SELECT X.cw_name
-FROM cw_ERType AS X
+FROM cw_CWRType AS X
 UNION ALL
 SELECT X.cw_name
 FROM cw_File AS X
@@ -376,108 +376,108 @@
 #     ''''''),
 
     # DISTINCT, can use relatin under exists scope as principal
-    ('DISTINCT Any X,Y WHERE X name "EGroup", Y eid IN(1, 2, 3), EXISTS(X read_permission Y)',
+    ('DISTINCT Any X,Y WHERE X name "CWGroup", Y eid IN(1, 2, 3), EXISTS(X read_permission Y)',
      '''SELECT DISTINCT X.cw_eid, rel_read_permission0.eid_to
-FROM cw_EEType AS X, read_permission_relation AS rel_read_permission0
-WHERE X.cw_name=EGroup AND rel_read_permission0.eid_to IN(1, 2, 3) AND EXISTS(SELECT 1 WHERE rel_read_permission0.eid_from=X.cw_eid)
+FROM cw_CWEType AS X, read_permission_relation AS rel_read_permission0
+WHERE X.cw_name=CWGroup AND rel_read_permission0.eid_to IN(1, 2, 3) AND EXISTS(SELECT 1 WHERE rel_read_permission0.eid_from=X.cw_eid)
 UNION
 SELECT DISTINCT X.cw_eid, rel_read_permission0.eid_to
-FROM cw_ERType AS X, read_permission_relation AS rel_read_permission0
-WHERE X.cw_name=EGroup AND rel_read_permission0.eid_to IN(1, 2, 3) AND EXISTS(SELECT 1 WHERE rel_read_permission0.eid_from=X.cw_eid)'''),
+FROM cw_CWRType AS X, read_permission_relation AS rel_read_permission0
+WHERE X.cw_name=CWGroup AND rel_read_permission0.eid_to IN(1, 2, 3) AND EXISTS(SELECT 1 WHERE rel_read_permission0.eid_from=X.cw_eid)'''),
 
     # no distinct, Y can't be invariant
-    ('Any X,Y WHERE X name "EGroup", Y eid IN(1, 2, 3), EXISTS(X read_permission Y)',
+    ('Any X,Y WHERE X name "CWGroup", Y eid IN(1, 2, 3), EXISTS(X read_permission Y)',
      '''SELECT X.cw_eid, Y.cw_eid
-FROM cw_EEType AS X, cw_EGroup AS Y
-WHERE X.cw_name=EGroup AND Y.cw_eid IN(1, 2, 3) AND EXISTS(SELECT 1 FROM read_permission_relation AS rel_read_permission0 WHERE rel_read_permission0.eid_from=X.cw_eid AND rel_read_permission0.eid_to=Y.cw_eid)
+FROM cw_CWEType AS X, cw_CWGroup AS Y
+WHERE X.cw_name=CWGroup AND Y.cw_eid IN(1, 2, 3) AND EXISTS(SELECT 1 FROM read_permission_relation AS rel_read_permission0 WHERE rel_read_permission0.eid_from=X.cw_eid AND rel_read_permission0.eid_to=Y.cw_eid)
 UNION ALL
 SELECT X.cw_eid, Y.cw_eid
-FROM cw_EEType AS X, cw_RQLExpression AS Y
-WHERE X.cw_name=EGroup AND Y.cw_eid IN(1, 2, 3) AND EXISTS(SELECT 1 FROM read_permission_relation AS rel_read_permission0 WHERE rel_read_permission0.eid_from=X.cw_eid AND rel_read_permission0.eid_to=Y.cw_eid)
+FROM cw_CWEType AS X, cw_RQLExpression AS Y
+WHERE X.cw_name=CWGroup AND Y.cw_eid IN(1, 2, 3) AND EXISTS(SELECT 1 FROM read_permission_relation AS rel_read_permission0 WHERE rel_read_permission0.eid_from=X.cw_eid AND rel_read_permission0.eid_to=Y.cw_eid)
 UNION ALL
 SELECT X.cw_eid, Y.cw_eid
-FROM cw_EGroup AS Y, cw_ERType AS X
-WHERE X.cw_name=EGroup AND Y.cw_eid IN(1, 2, 3) AND EXISTS(SELECT 1 FROM read_permission_relation AS rel_read_permission0 WHERE rel_read_permission0.eid_from=X.cw_eid AND rel_read_permission0.eid_to=Y.cw_eid)
+FROM cw_CWGroup AS Y, cw_CWRType AS X
+WHERE X.cw_name=CWGroup AND Y.cw_eid IN(1, 2, 3) AND EXISTS(SELECT 1 FROM read_permission_relation AS rel_read_permission0 WHERE rel_read_permission0.eid_from=X.cw_eid AND rel_read_permission0.eid_to=Y.cw_eid)
 UNION ALL
 SELECT X.cw_eid, Y.cw_eid
-FROM cw_ERType AS X, cw_RQLExpression AS Y
-WHERE X.cw_name=EGroup AND Y.cw_eid IN(1, 2, 3) AND EXISTS(SELECT 1 FROM read_permission_relation AS rel_read_permission0 WHERE rel_read_permission0.eid_from=X.cw_eid AND rel_read_permission0.eid_to=Y.cw_eid)'''),
+FROM cw_CWRType AS X, cw_RQLExpression AS Y
+WHERE X.cw_name=CWGroup AND Y.cw_eid IN(1, 2, 3) AND EXISTS(SELECT 1 FROM read_permission_relation AS rel_read_permission0 WHERE rel_read_permission0.eid_from=X.cw_eid AND rel_read_permission0.eid_to=Y.cw_eid)'''),
 
     # DISTINCT but NEGED exists, can't be invariant
-    ('DISTINCT Any X,Y WHERE X name "EGroup", Y eid IN(1, 2, 3), NOT EXISTS(X read_permission Y)',
+    ('DISTINCT Any X,Y WHERE X name "CWGroup", Y eid IN(1, 2, 3), NOT EXISTS(X read_permission Y)',
      '''SELECT DISTINCT X.cw_eid, Y.cw_eid
-FROM cw_EEType AS X, cw_EGroup AS Y
-WHERE X.cw_name=EGroup AND Y.cw_eid IN(1, 2, 3) AND NOT EXISTS(SELECT 1 FROM read_permission_relation AS rel_read_permission0 WHERE rel_read_permission0.eid_from=X.cw_eid AND rel_read_permission0.eid_to=Y.cw_eid)
+FROM cw_CWEType AS X, cw_CWGroup AS Y
+WHERE X.cw_name=CWGroup AND Y.cw_eid IN(1, 2, 3) AND NOT EXISTS(SELECT 1 FROM read_permission_relation AS rel_read_permission0 WHERE rel_read_permission0.eid_from=X.cw_eid AND rel_read_permission0.eid_to=Y.cw_eid)
 UNION
 SELECT DISTINCT X.cw_eid, Y.cw_eid
-FROM cw_EEType AS X, cw_RQLExpression AS Y
-WHERE X.cw_name=EGroup AND Y.cw_eid IN(1, 2, 3) AND NOT EXISTS(SELECT 1 FROM read_permission_relation AS rel_read_permission0 WHERE rel_read_permission0.eid_from=X.cw_eid AND rel_read_permission0.eid_to=Y.cw_eid)
+FROM cw_CWEType AS X, cw_RQLExpression AS Y
+WHERE X.cw_name=CWGroup AND Y.cw_eid IN(1, 2, 3) AND NOT EXISTS(SELECT 1 FROM read_permission_relation AS rel_read_permission0 WHERE rel_read_permission0.eid_from=X.cw_eid AND rel_read_permission0.eid_to=Y.cw_eid)
 UNION
 SELECT DISTINCT X.cw_eid, Y.cw_eid
-FROM cw_EGroup AS Y, cw_ERType AS X
-WHERE X.cw_name=EGroup AND Y.cw_eid IN(1, 2, 3) AND NOT EXISTS(SELECT 1 FROM read_permission_relation AS rel_read_permission0 WHERE rel_read_permission0.eid_from=X.cw_eid AND rel_read_permission0.eid_to=Y.cw_eid)
+FROM cw_CWGroup AS Y, cw_CWRType AS X
+WHERE X.cw_name=CWGroup AND Y.cw_eid IN(1, 2, 3) AND NOT EXISTS(SELECT 1 FROM read_permission_relation AS rel_read_permission0 WHERE rel_read_permission0.eid_from=X.cw_eid AND rel_read_permission0.eid_to=Y.cw_eid)
 UNION
 SELECT DISTINCT X.cw_eid, Y.cw_eid
-FROM cw_ERType AS X, cw_RQLExpression AS Y
-WHERE X.cw_name=EGroup AND Y.cw_eid IN(1, 2, 3) AND NOT EXISTS(SELECT 1 FROM read_permission_relation AS rel_read_permission0 WHERE rel_read_permission0.eid_from=X.cw_eid AND rel_read_permission0.eid_to=Y.cw_eid)'''),
+FROM cw_CWRType AS X, cw_RQLExpression AS Y
+WHERE X.cw_name=CWGroup AND Y.cw_eid IN(1, 2, 3) AND NOT EXISTS(SELECT 1 FROM read_permission_relation AS rel_read_permission0 WHERE rel_read_permission0.eid_from=X.cw_eid AND rel_read_permission0.eid_to=Y.cw_eid)'''),
 
     # should generate the same query as above
-    ('DISTINCT Any X,Y WHERE X name "EGroup", Y eid IN(1, 2, 3), NOT X read_permission Y',
+    ('DISTINCT Any X,Y WHERE X name "CWGroup", Y eid IN(1, 2, 3), NOT X read_permission Y',
      '''SELECT DISTINCT X.cw_eid, Y.cw_eid
-FROM cw_EEType AS X, cw_EGroup AS Y
-WHERE X.cw_name=EGroup AND Y.cw_eid IN(1, 2, 3) AND NOT EXISTS(SELECT 1 FROM read_permission_relation AS rel_read_permission0 WHERE rel_read_permission0.eid_from=X.cw_eid AND rel_read_permission0.eid_to=Y.cw_eid)
+FROM cw_CWEType AS X, cw_CWGroup AS Y
+WHERE X.cw_name=CWGroup AND Y.cw_eid IN(1, 2, 3) AND NOT EXISTS(SELECT 1 FROM read_permission_relation AS rel_read_permission0 WHERE rel_read_permission0.eid_from=X.cw_eid AND rel_read_permission0.eid_to=Y.cw_eid)
 UNION
 SELECT DISTINCT X.cw_eid, Y.cw_eid
-FROM cw_EEType AS X, cw_RQLExpression AS Y
-WHERE X.cw_name=EGroup AND Y.cw_eid IN(1, 2, 3) AND NOT EXISTS(SELECT 1 FROM read_permission_relation AS rel_read_permission0 WHERE rel_read_permission0.eid_from=X.cw_eid AND rel_read_permission0.eid_to=Y.cw_eid)
+FROM cw_CWEType AS X, cw_RQLExpression AS Y
+WHERE X.cw_name=CWGroup AND Y.cw_eid IN(1, 2, 3) AND NOT EXISTS(SELECT 1 FROM read_permission_relation AS rel_read_permission0 WHERE rel_read_permission0.eid_from=X.cw_eid AND rel_read_permission0.eid_to=Y.cw_eid)
 UNION
 SELECT DISTINCT X.cw_eid, Y.cw_eid
-FROM cw_EGroup AS Y, cw_ERType AS X
-WHERE X.cw_name=EGroup AND Y.cw_eid IN(1, 2, 3) AND NOT EXISTS(SELECT 1 FROM read_permission_relation AS rel_read_permission0 WHERE rel_read_permission0.eid_from=X.cw_eid AND rel_read_permission0.eid_to=Y.cw_eid)
+FROM cw_CWGroup AS Y, cw_CWRType AS X
+WHERE X.cw_name=CWGroup AND Y.cw_eid IN(1, 2, 3) AND NOT EXISTS(SELECT 1 FROM read_permission_relation AS rel_read_permission0 WHERE rel_read_permission0.eid_from=X.cw_eid AND rel_read_permission0.eid_to=Y.cw_eid)
 UNION
 SELECT DISTINCT X.cw_eid, Y.cw_eid
-FROM cw_ERType AS X, cw_RQLExpression AS Y
-WHERE X.cw_name=EGroup AND Y.cw_eid IN(1, 2, 3) AND NOT EXISTS(SELECT 1 FROM read_permission_relation AS rel_read_permission0 WHERE rel_read_permission0.eid_from=X.cw_eid AND rel_read_permission0.eid_to=Y.cw_eid)'''),
+FROM cw_CWRType AS X, cw_RQLExpression AS Y
+WHERE X.cw_name=CWGroup AND Y.cw_eid IN(1, 2, 3) AND NOT EXISTS(SELECT 1 FROM read_permission_relation AS rel_read_permission0 WHERE rel_read_permission0.eid_from=X.cw_eid AND rel_read_permission0.eid_to=Y.cw_eid)'''),
     
     # neged relation, can't be inveriant
-    ('Any X,Y WHERE X name "EGroup", Y eid IN(1, 2, 3), NOT X read_permission Y',
+    ('Any X,Y WHERE X name "CWGroup", Y eid IN(1, 2, 3), NOT X read_permission Y',
      '''SELECT X.cw_eid, Y.cw_eid
-FROM cw_EEType AS X, cw_EGroup AS Y
-WHERE X.cw_name=EGroup AND Y.cw_eid IN(1, 2, 3) AND NOT EXISTS(SELECT 1 FROM read_permission_relation AS rel_read_permission0 WHERE rel_read_permission0.eid_from=X.cw_eid AND rel_read_permission0.eid_to=Y.cw_eid)
+FROM cw_CWEType AS X, cw_CWGroup AS Y
+WHERE X.cw_name=CWGroup AND Y.cw_eid IN(1, 2, 3) AND NOT EXISTS(SELECT 1 FROM read_permission_relation AS rel_read_permission0 WHERE rel_read_permission0.eid_from=X.cw_eid AND rel_read_permission0.eid_to=Y.cw_eid)
 UNION ALL
 SELECT X.cw_eid, Y.cw_eid
-FROM cw_EEType AS X, cw_RQLExpression AS Y
-WHERE X.cw_name=EGroup AND Y.cw_eid IN(1, 2, 3) AND NOT EXISTS(SELECT 1 FROM read_permission_relation AS rel_read_permission0 WHERE rel_read_permission0.eid_from=X.cw_eid AND rel_read_permission0.eid_to=Y.cw_eid)
+FROM cw_CWEType AS X, cw_RQLExpression AS Y
+WHERE X.cw_name=CWGroup AND Y.cw_eid IN(1, 2, 3) AND NOT EXISTS(SELECT 1 FROM read_permission_relation AS rel_read_permission0 WHERE rel_read_permission0.eid_from=X.cw_eid AND rel_read_permission0.eid_to=Y.cw_eid)
 UNION ALL
 SELECT X.cw_eid, Y.cw_eid
-FROM cw_EGroup AS Y, cw_ERType AS X
-WHERE X.cw_name=EGroup AND Y.cw_eid IN(1, 2, 3) AND NOT EXISTS(SELECT 1 FROM read_permission_relation AS rel_read_permission0 WHERE rel_read_permission0.eid_from=X.cw_eid AND rel_read_permission0.eid_to=Y.cw_eid)
+FROM cw_CWGroup AS Y, cw_CWRType AS X
+WHERE X.cw_name=CWGroup AND Y.cw_eid IN(1, 2, 3) AND NOT EXISTS(SELECT 1 FROM read_permission_relation AS rel_read_permission0 WHERE rel_read_permission0.eid_from=X.cw_eid AND rel_read_permission0.eid_to=Y.cw_eid)
 UNION ALL
 SELECT X.cw_eid, Y.cw_eid
-FROM cw_ERType AS X, cw_RQLExpression AS Y
-WHERE X.cw_name=EGroup AND Y.cw_eid IN(1, 2, 3) AND NOT EXISTS(SELECT 1 FROM read_permission_relation AS rel_read_permission0 WHERE rel_read_permission0.eid_from=X.cw_eid AND rel_read_permission0.eid_to=Y.cw_eid)'''),
+FROM cw_CWRType AS X, cw_RQLExpression AS Y
+WHERE X.cw_name=CWGroup AND Y.cw_eid IN(1, 2, 3) AND NOT EXISTS(SELECT 1 FROM read_permission_relation AS rel_read_permission0 WHERE rel_read_permission0.eid_from=X.cw_eid AND rel_read_permission0.eid_to=Y.cw_eid)'''),
 
     ('Any MAX(X)+MIN(X), N GROUPBY N WHERE X name N;',
      '''SELECT (MAX(T1.C0) + MIN(T1.C0)), T1.C1 FROM (SELECT X.cw_eid AS C0, X.cw_name AS C1
 FROM cw_Basket AS X
 UNION ALL
 SELECT X.cw_eid AS C0, X.cw_name AS C1
-FROM cw_ECache AS X
+FROM cw_CWCache AS X
 UNION ALL
 SELECT X.cw_eid AS C0, X.cw_name AS C1
-FROM cw_EConstraintType AS X
+FROM cw_CWConstraintType AS X
 UNION ALL
 SELECT X.cw_eid AS C0, X.cw_name AS C1
-FROM cw_EEType AS X
+FROM cw_CWEType AS X
 UNION ALL
 SELECT X.cw_eid AS C0, X.cw_name AS C1
-FROM cw_EGroup AS X
+FROM cw_CWGroup AS X
 UNION ALL
 SELECT X.cw_eid AS C0, X.cw_name AS C1
-FROM cw_EPermission AS X
+FROM cw_CWPermission AS X
 UNION ALL
 SELECT X.cw_eid AS C0, X.cw_name AS C1
-FROM cw_ERType AS X
+FROM cw_CWRType AS X
 UNION ALL
 SELECT X.cw_eid AS C0, X.cw_name AS C1
 FROM cw_File AS X
@@ -523,25 +523,25 @@
 '''),
 
     # ambiguity in EXISTS() -> should union the sub-query
-    ('Any T WHERE T is Tag, NOT T name in ("t1", "t2"), EXISTS(T tags X, X is IN (EUser, EGroup))',
+    ('Any T WHERE T is Tag, NOT T name in ("t1", "t2"), EXISTS(T tags X, X is IN (CWUser, CWGroup))',
      '''SELECT T.cw_eid
 FROM cw_Tag AS T
-WHERE NOT (T.cw_name IN(t1, t2)) AND EXISTS(SELECT 1 FROM tags_relation AS rel_tags0, cw_EGroup AS X WHERE rel_tags0.eid_from=T.cw_eid AND rel_tags0.eid_to=X.cw_eid UNION SELECT 1 FROM tags_relation AS rel_tags1, cw_EUser AS X WHERE rel_tags1.eid_from=T.cw_eid AND rel_tags1.eid_to=X.cw_eid)'''),
+WHERE NOT (T.cw_name IN(t1, t2)) AND EXISTS(SELECT 1 FROM tags_relation AS rel_tags0, cw_CWGroup AS X WHERE rel_tags0.eid_from=T.cw_eid AND rel_tags0.eid_to=X.cw_eid UNION SELECT 1 FROM tags_relation AS rel_tags1, cw_CWUser AS X WHERE rel_tags1.eid_from=T.cw_eid AND rel_tags1.eid_to=X.cw_eid)'''),
 
     # must not use a relation in EXISTS scope to inline a variable 
     ('Any U WHERE U eid IN (1,2), EXISTS(X owned_by U)',
      '''SELECT U.cw_eid
-FROM cw_EUser AS U
+FROM cw_CWUser AS U
 WHERE U.cw_eid IN(1, 2) AND EXISTS(SELECT 1 FROM owned_by_relation AS rel_owned_by0 WHERE rel_owned_by0.eid_to=U.cw_eid)'''),
 
     ('Any U WHERE EXISTS(U eid IN (1,2), X owned_by U)',
      '''SELECT U.cw_eid
-FROM cw_EUser AS U
+FROM cw_CWUser AS U
 WHERE EXISTS(SELECT 1 FROM owned_by_relation AS rel_owned_by0 WHERE U.cw_eid IN(1, 2) AND rel_owned_by0.eid_to=U.cw_eid)'''),
 
     ('Any COUNT(U) WHERE EXISTS (P owned_by U, P is IN (Note, Affaire))',
      '''SELECT COUNT(U.cw_eid)
-FROM cw_EUser AS U
+FROM cw_CWUser AS U
 WHERE EXISTS(SELECT 1 FROM owned_by_relation AS rel_owned_by0, cw_Affaire AS P WHERE rel_owned_by0.eid_from=P.cw_eid AND rel_owned_by0.eid_to=U.cw_eid UNION SELECT 1 FROM owned_by_relation AS rel_owned_by1, cw_Note AS P WHERE rel_owned_by1.eid_from=P.cw_eid AND rel_owned_by1.eid_to=U.cw_eid)'''),
 
     ('Any MAX(X)',
@@ -584,7 +584,7 @@
     
     ('Any X GROUPBY X ORDERBY Y WHERE X eid 12, X login Y',
      '''SELECT X.cw_eid
-FROM cw_EUser AS X
+FROM cw_CWUser AS X
 WHERE X.cw_eid=12
 GROUP BY X.cw_eid
 ORDER BY X.cw_login'''),
@@ -598,12 +598,12 @@
 
     ('DISTINCT Any X ORDERBY stockproc(X) WHERE U login X',
      '''SELECT T1.C0 FROM (SELECT DISTINCT U.cw_login AS C0, STOCKPROC(U.cw_login) AS C1
-FROM cw_EUser AS U
+FROM cw_CWUser AS U
 ORDER BY 2) AS T1'''),
     
     ('DISTINCT Any X ORDERBY Y WHERE B bookmarked_by X, X login Y',
      '''SELECT T1.C0 FROM (SELECT DISTINCT X.cw_eid AS C0, X.cw_login AS C1
-FROM bookmarked_by_relation AS rel_bookmarked_by0, cw_EUser AS X
+FROM bookmarked_by_relation AS rel_bookmarked_by0, cw_CWUser AS X
 WHERE rel_bookmarked_by0.eid_to=X.cw_eid
 ORDER BY 2) AS T1'''),
 
@@ -613,7 +613,7 @@
 WHERE X.cw_in_state=S.cw_eid
 UNION
 SELECT DISTINCT X.cw_eid AS C0, S.cw_name AS C1
-FROM cw_EUser AS X, cw_State AS S
+FROM cw_CWUser AS X, cw_State AS S
 WHERE X.cw_in_state=S.cw_eid
 UNION
 SELECT DISTINCT X.cw_eid AS C0, S.cw_name AS C1
@@ -679,7 +679,7 @@
     
     ('Any S WHERE T is Tag, T name TN, NOT T eid 28258, T tags S, S name SN',
      '''SELECT S.cw_eid
-FROM cw_EGroup AS S, cw_Tag AS T, tags_relation AS rel_tags0
+FROM cw_CWGroup AS S, cw_Tag AS T, tags_relation AS rel_tags0
 WHERE NOT (T.cw_eid=28258) AND rel_tags0.eid_from=T.cw_eid AND rel_tags0.eid_to=S.cw_eid
 UNION ALL
 SELECT S.cw_eid
@@ -707,7 +707,7 @@
 WHERE NOT EXISTS(SELECT 1 FROM evaluee_relation AS rel_evaluee0 WHERE rel_evaluee0.eid_from=Y.cw_eid)
 UNION ALL
 SELECT Y.cw_eid
-FROM cw_EUser AS Y
+FROM cw_CWUser AS Y
 WHERE NOT EXISTS(SELECT 1 FROM evaluee_relation AS rel_evaluee0 WHERE rel_evaluee0.eid_from=Y.cw_eid)
 UNION ALL
 SELECT Y.cw_eid
@@ -722,10 +722,10 @@
 FROM cw_SubDivision AS Y
 WHERE NOT EXISTS(SELECT 1 FROM evaluee_relation AS rel_evaluee0 WHERE rel_evaluee0.eid_from=Y.cw_eid)'''),
 
-    ('Any X WHERE NOT Y evaluee X, Y is EUser',
+    ('Any X WHERE NOT Y evaluee X, Y is CWUser',
      '''SELECT X.cw_eid
 FROM cw_Note AS X
-WHERE NOT EXISTS(SELECT 1 FROM evaluee_relation AS rel_evaluee0,cw_EUser AS Y WHERE rel_evaluee0.eid_from=Y.cw_eid AND rel_evaluee0.eid_to=X.cw_eid)'''),
+WHERE NOT EXISTS(SELECT 1 FROM evaluee_relation AS rel_evaluee0,cw_CWUser AS Y WHERE rel_evaluee0.eid_from=Y.cw_eid AND rel_evaluee0.eid_to=X.cw_eid)'''),
     
     ('Any X,T WHERE X title T, NOT X is Bookmark',
      '''SELECT DISTINCT X.cw_eid, X.cw_title
@@ -734,18 +734,18 @@
 SELECT DISTINCT X.cw_eid, X.cw_title
 FROM cw_EmailThread AS X'''),
 
-    ('Any K,V WHERE P is EProperty, P pkey K, P value V, NOT P for_user U',
+    ('Any K,V WHERE P is CWProperty, P pkey K, P value V, NOT P for_user U',
      '''SELECT DISTINCT P.cw_pkey, P.cw_value
-FROM cw_EProperty AS P
+FROM cw_CWProperty AS P
 WHERE P.cw_for_user IS NULL'''),
 
-    ('Any S WHERE NOT X in_state S, X is IN(Affaire, EUser)',
+    ('Any S WHERE NOT X in_state S, X is IN(Affaire, CWUser)',
      '''SELECT DISTINCT S.cw_eid
 FROM cw_Affaire AS X, cw_State AS S
 WHERE (X.cw_in_state IS NULL OR X.cw_in_state!=S.cw_eid)
 INTERSECT
 SELECT DISTINCT S.cw_eid
-FROM cw_EUser AS X, cw_State AS S
+FROM cw_CWUser AS X, cw_State AS S
 WHERE (X.cw_in_state IS NULL OR X.cw_in_state!=S.cw_eid)'''),
     ]
 
@@ -791,7 +791,7 @@
     ('Any X WHERE X is Affaire, S is Societe, EXISTS(X owned_by U OR (X concerne S?, S owned_by U))',
      '''SELECT X.cw_eid
 FROM cw_Affaire AS X
-WHERE EXISTS(SELECT 1 FROM owned_by_relation AS rel_owned_by0, cw_EUser AS U, cw_Affaire AS A LEFT OUTER JOIN concerne_relation AS rel_concerne1 ON (rel_concerne1.eid_from=A.cw_eid) LEFT OUTER JOIN cw_Societe AS S ON (rel_concerne1.eid_to=S.cw_eid), owned_by_relation AS rel_owned_by2 WHERE ((rel_owned_by0.eid_from=A.cw_eid AND rel_owned_by0.eid_to=U.cw_eid) OR (rel_owned_by2.eid_from=S.cw_eid AND rel_owned_by2.eid_to=U.cw_eid)) AND X.cw_eid=A.cw_eid)'''),
+WHERE EXISTS(SELECT 1 FROM owned_by_relation AS rel_owned_by0, cw_CWUser AS U, cw_Affaire AS A LEFT OUTER JOIN concerne_relation AS rel_concerne1 ON (rel_concerne1.eid_from=A.cw_eid) LEFT OUTER JOIN cw_Societe AS S ON (rel_concerne1.eid_to=S.cw_eid), owned_by_relation AS rel_owned_by2 WHERE ((rel_owned_by0.eid_from=A.cw_eid AND rel_owned_by0.eid_to=U.cw_eid) OR (rel_owned_by2.eid_from=S.cw_eid AND rel_owned_by2.eid_to=U.cw_eid)) AND X.cw_eid=A.cw_eid)'''),
 
     ('Any C,M WHERE C travaille G?, G evaluee M?, G is Societe',
      '''SELECT C.cw_eid, rel_evaluee1.eid_to
@@ -804,7 +804,7 @@
      'F name "read", F require_group E, U in_group E)), U eid 1',
      '''SELECT A.cw_eid, rel_documented_by0.eid_to
 FROM cw_Affaire AS A LEFT OUTER JOIN documented_by_relation AS rel_documented_by0 ON (rel_documented_by0.eid_from=A.cw_eid)
-WHERE ((rel_documented_by0.eid_to IS NULL) OR (EXISTS(SELECT 1 FROM require_permission_relation AS rel_require_permission1, cw_EPermission AS F, require_group_relation AS rel_require_group2, in_group_relation AS rel_in_group3 WHERE rel_documented_by0.eid_to=rel_require_permission1.eid_from AND rel_require_permission1.eid_to=F.cw_eid AND F.cw_name=read AND rel_require_group2.eid_from=F.cw_eid AND rel_in_group3.eid_to=rel_require_group2.eid_to AND rel_in_group3.eid_from=1)))'''),
+WHERE ((rel_documented_by0.eid_to IS NULL) OR (EXISTS(SELECT 1 FROM require_permission_relation AS rel_require_permission1, cw_CWPermission AS F, require_group_relation AS rel_require_group2, in_group_relation AS rel_in_group3 WHERE rel_documented_by0.eid_to=rel_require_permission1.eid_from AND rel_require_permission1.eid_to=F.cw_eid AND F.cw_name=read AND rel_require_group2.eid_from=F.cw_eid AND rel_in_group3.eid_to=rel_require_group2.eid_to AND rel_in_group3.eid_from=1)))'''),
 
     ("Any X WHERE X eid 12, P? connait X",
      '''SELECT X.cw_eid
@@ -818,7 +818,7 @@
     ('Any GN, TN ORDERBY GN WHERE T tags G?, T name TN, G name GN',
     '''SELECT _T0.C1, T.cw_name
 FROM cw_Tag AS T LEFT OUTER JOIN tags_relation AS rel_tags0 ON (rel_tags0.eid_from=T.cw_eid) LEFT OUTER JOIN (SELECT G.cw_eid AS C0, G.cw_name AS C1
-FROM cw_EGroup AS G
+FROM cw_CWGroup AS G
 UNION ALL
 SELECT G.cw_eid AS C0, G.cw_name AS C1
 FROM cw_State AS G
@@ -829,9 +829,9 @@
 
 
     # optional variable with additional restriction
-    ('Any T,G WHERE T tags G?, G name "hop", G is EGroup',
+    ('Any T,G WHERE T tags G?, G name "hop", G is CWGroup',
      '''SELECT T.cw_eid, G.cw_eid
-FROM cw_Tag AS T LEFT OUTER JOIN tags_relation AS rel_tags0 ON (rel_tags0.eid_from=T.cw_eid) LEFT OUTER JOIN cw_EGroup AS G ON (rel_tags0.eid_to=G.cw_eid AND G.cw_name=hop)'''),
+FROM cw_Tag AS T LEFT OUTER JOIN tags_relation AS rel_tags0 ON (rel_tags0.eid_from=T.cw_eid) LEFT OUTER JOIN cw_CWGroup AS G ON (rel_tags0.eid_to=G.cw_eid AND G.cw_name=hop)'''),
 
     # optional variable with additional invariant restriction
     ('Any T,G WHERE T tags G?, G eid 12',
@@ -839,33 +839,33 @@
 FROM cw_Tag AS T LEFT OUTER JOIN tags_relation AS rel_tags0 ON (rel_tags0.eid_from=T.cw_eid AND rel_tags0.eid_to=12)'''),
 
     # optional variable with additional restriction appearing before the relation
-    ('Any T,G WHERE G name "hop", T tags G?, G is EGroup',
+    ('Any T,G WHERE G name "hop", T tags G?, G is CWGroup',
      '''SELECT T.cw_eid, G.cw_eid
-FROM cw_Tag AS T LEFT OUTER JOIN tags_relation AS rel_tags0 ON (rel_tags0.eid_from=T.cw_eid) LEFT OUTER JOIN cw_EGroup AS G ON (rel_tags0.eid_to=G.cw_eid AND G.cw_name=hop)'''),
+FROM cw_Tag AS T LEFT OUTER JOIN tags_relation AS rel_tags0 ON (rel_tags0.eid_from=T.cw_eid) LEFT OUTER JOIN cw_CWGroup AS G ON (rel_tags0.eid_to=G.cw_eid AND G.cw_name=hop)'''),
 
     # optional variable with additional restriction on inlined relation
     # XXX the expected result should be as the query below. So what, raise BadRQLQuery ?
-    ('Any T,G,S WHERE T tags G?, G in_state S, S name "hop", G is EUser',
+    ('Any T,G,S WHERE T tags G?, G in_state S, S name "hop", G is CWUser',
      '''SELECT T.cw_eid, G.cw_eid, S.cw_eid
-FROM cw_State AS S, cw_Tag AS T LEFT OUTER JOIN tags_relation AS rel_tags0 ON (rel_tags0.eid_from=T.cw_eid) LEFT OUTER JOIN cw_EUser AS G ON (rel_tags0.eid_to=G.cw_eid)
+FROM cw_State AS S, cw_Tag AS T LEFT OUTER JOIN tags_relation AS rel_tags0 ON (rel_tags0.eid_from=T.cw_eid) LEFT OUTER JOIN cw_CWUser AS G ON (rel_tags0.eid_to=G.cw_eid)
 WHERE G.cw_in_state=S.cw_eid AND S.cw_name=hop
 '''),
 
     # optional variable with additional invariant restriction on an inlined relation
-    ('Any T,G,S WHERE T tags G, G in_state S?, S eid 1, G is EUser',
+    ('Any T,G,S WHERE T tags G, G in_state S?, S eid 1, G is CWUser',
      '''SELECT rel_tags0.eid_from, G.cw_eid, G.cw_in_state
-FROM cw_EUser AS G, tags_relation AS rel_tags0
+FROM cw_CWUser AS G, tags_relation AS rel_tags0
 WHERE rel_tags0.eid_to=G.cw_eid AND (G.cw_in_state=1 OR G.cw_in_state IS NULL)'''),
 
     # two optional variables with additional invariant restriction on an inlined relation
-    ('Any T,G,S WHERE T tags G?, G in_state S?, S eid 1, G is EUser',
+    ('Any T,G,S WHERE T tags G?, G in_state S?, S eid 1, G is CWUser',
      '''SELECT T.cw_eid, G.cw_eid, G.cw_in_state
-FROM cw_Tag AS T LEFT OUTER JOIN tags_relation AS rel_tags0 ON (rel_tags0.eid_from=T.cw_eid) LEFT OUTER JOIN cw_EUser AS G ON (rel_tags0.eid_to=G.cw_eid AND (G.cw_in_state=1 OR G.cw_in_state IS NULL))'''),
+FROM cw_Tag AS T LEFT OUTER JOIN tags_relation AS rel_tags0 ON (rel_tags0.eid_from=T.cw_eid) LEFT OUTER JOIN cw_CWUser AS G ON (rel_tags0.eid_to=G.cw_eid AND (G.cw_in_state=1 OR G.cw_in_state IS NULL))'''),
 
     # two optional variables with additional restriction on an inlined relation
-    ('Any T,G,S WHERE T tags G?, G in_state S?, S name "hop", G is EUser',
+    ('Any T,G,S WHERE T tags G?, G in_state S?, S name "hop", G is CWUser',
      '''SELECT T.cw_eid, G.cw_eid, S.cw_eid
-FROM cw_Tag AS T LEFT OUTER JOIN tags_relation AS rel_tags0 ON (rel_tags0.eid_from=T.cw_eid) LEFT OUTER JOIN cw_EUser AS G ON (rel_tags0.eid_to=G.cw_eid) LEFT OUTER JOIN cw_State AS S ON (G.cw_in_state=S.cw_eid AND S.cw_name=hop)'''),
+FROM cw_Tag AS T LEFT OUTER JOIN tags_relation AS rel_tags0 ON (rel_tags0.eid_from=T.cw_eid) LEFT OUTER JOIN cw_CWUser AS G ON (rel_tags0.eid_to=G.cw_eid) LEFT OUTER JOIN cw_State AS S ON (G.cw_in_state=S.cw_eid AND S.cw_name=hop)'''),
     
     # two optional variables with additional restriction on an ambigous inlined relation
     ('Any T,G,S WHERE T tags G?, G in_state S?, S name "hop"',
@@ -874,7 +874,7 @@
 FROM cw_Affaire AS G LEFT OUTER JOIN cw_State AS S ON (G.cw_in_state=S.cw_eid AND S.cw_name=hop) 
 UNION ALL
 SELECT G.cw_eid AS C0, S.cw_eid AS C1
-FROM cw_EUser AS G LEFT OUTER JOIN cw_State AS S ON (G.cw_in_state=S.cw_eid AND S.cw_name=hop) 
+FROM cw_CWUser AS G LEFT OUTER JOIN cw_State AS S ON (G.cw_in_state=S.cw_eid AND S.cw_name=hop) 
 UNION ALL
 SELECT G.cw_eid AS C0, S.cw_eid AS C1
 FROM cw_Note AS G LEFT OUTER JOIN cw_State AS S ON (G.cw_in_state=S.cw_eid AND S.cw_name=hop) ) AS _T0 ON (rel_tags0.eid_to=_T0.C0)'''),
@@ -1039,17 +1039,17 @@
 FROM cw_Note AS N, cw_Personne AS P
 WHERE (N.cw_ecrit_par IS NULL OR N.cw_ecrit_par!=P.cw_eid) AND N.cw_eid=512'''),
 
-    ('Any S,ES,T WHERE S state_of ET, ET name "EUser", ES allowed_transition T, T destination_state S',
+    ('Any S,ES,T WHERE S state_of ET, ET name "CWUser", ES allowed_transition T, T destination_state S',
      '''SELECT T.cw_destination_state, rel_allowed_transition1.eid_from, T.cw_eid
-FROM allowed_transition_relation AS rel_allowed_transition1, cw_EEType AS ET, cw_Transition AS T, state_of_relation AS rel_state_of0
-WHERE T.cw_destination_state=rel_state_of0.eid_from AND rel_state_of0.eid_to=ET.cw_eid AND ET.cw_name=EUser AND rel_allowed_transition1.eid_to=T.cw_eid'''),
+FROM allowed_transition_relation AS rel_allowed_transition1, cw_CWEType AS ET, cw_Transition AS T, state_of_relation AS rel_state_of0
+WHERE T.cw_destination_state=rel_state_of0.eid_from AND rel_state_of0.eid_to=ET.cw_eid AND ET.cw_name=CWUser AND rel_allowed_transition1.eid_to=T.cw_eid'''),
     ('Any O WHERE S eid 0, S in_state O',
      '''SELECT S.cw_in_state
 FROM cw_Affaire AS S
 WHERE S.cw_eid=0 AND S.cw_in_state IS NOT NULL
 UNION ALL
 SELECT S.cw_in_state
-FROM cw_EUser AS S
+FROM cw_CWUser AS S
 WHERE S.cw_eid=0 AND S.cw_in_state IS NOT NULL
 UNION ALL
 SELECT S.cw_in_state
@@ -1065,7 +1065,7 @@
 WHERE (X.cw_in_state IS NULL OR X.cw_in_state!=S.cw_eid)
 INTERSECT
 SELECT DISTINCT S.cw_name
-FROM cw_EUser AS X, cw_State AS S
+FROM cw_CWUser AS X, cw_State AS S
 WHERE (X.cw_in_state IS NULL OR X.cw_in_state!=S.cw_eid)
 INTERSECT
 SELECT DISTINCT S.cw_name
@@ -1171,11 +1171,11 @@
     def test1(self):
         self._checkall('Any count(RDEF) WHERE RDEF relation_type X, X eid %(x)s',
                        ("""SELECT COUNT(T1.C0) FROM (SELECT RDEF.cw_eid AS C0
-FROM cw_EFRDef AS RDEF
+FROM cw_CWAttribute AS RDEF
 WHERE RDEF.cw_relation_type=%(x)s
 UNION ALL
 SELECT RDEF.cw_eid AS C0
-FROM cw_ENFRDef AS RDEF
+FROM cw_CWRelation AS RDEF
 WHERE RDEF.cw_relation_type=%(x)s) AS T1""", {}),
                        )
 
@@ -1198,14 +1198,14 @@
 WHERE rel_in_basket0.eid_to=12''')
 
     def test_varmap(self):
-        self._check('Any X,L WHERE X is EUser, X in_group G, X login L, G name "users"',
+        self._check('Any X,L WHERE X is CWUser, X in_group G, X login L, G name "users"',
                     '''SELECT T00.x, T00.l
-FROM T00, cw_EGroup AS G, in_group_relation AS rel_in_group0
+FROM T00, cw_CWGroup AS G, in_group_relation AS rel_in_group0
 WHERE rel_in_group0.eid_from=T00.x AND rel_in_group0.eid_to=G.cw_eid AND G.cw_name=users''',
                     varmap={'X': 'T00.x', 'X.login': 'T00.l'})
-        self._check('Any X,L,GN WHERE X is EUser, X in_group G, X login L, G name GN',
+        self._check('Any X,L,GN WHERE X is CWUser, X in_group G, X login L, G name GN',
                     '''SELECT T00.x, T00.l, G.cw_name
-FROM T00, cw_EGroup AS G, in_group_relation AS rel_in_group0
+FROM T00, cw_CWGroup AS G, in_group_relation AS rel_in_group0
 WHERE rel_in_group0.eid_from=T00.x AND rel_in_group0.eid_to=G.cw_eid''',
                     varmap={'X': 'T00.x', 'X.login': 'T00.l'})
 
@@ -1311,7 +1311,7 @@
 UNION ALL
 (SELECT X.cw_eid AS C0
 FROM cw_Affaire AS X
-WHERE ((EXISTS(SELECT 1 FROM owned_by_relation AS rel_owned_by0 WHERE rel_owned_by0.eid_from=X.cw_eid AND rel_owned_by0.eid_to=1)) OR (((EXISTS(SELECT 1 FROM cw_Affaire AS D LEFT OUTER JOIN concerne_relation AS rel_concerne1 ON (rel_concerne1.eid_from=D.cw_eid) LEFT OUTER JOIN cw_Note AS B ON (rel_concerne1.eid_to=B.cw_eid), owned_by_relation AS rel_owned_by2 WHERE rel_owned_by2.eid_from=B.cw_eid AND rel_owned_by2.eid_to=1 AND X.cw_eid=D.cw_eid)) OR (EXISTS(SELECT 1 FROM cw_Affaire AS F LEFT OUTER JOIN concerne_relation AS rel_concerne3 ON (rel_concerne3.eid_from=F.cw_eid) LEFT OUTER JOIN cw_Societe AS E ON (rel_concerne3.eid_to=E.cw_eid), owned_by_relation AS rel_owned_by4 WHERE rel_owned_by4.eid_from=E.cw_eid AND rel_owned_by4.eid_to=1 AND X.cw_eid=F.cw_eid))))))) AS _T0, cw_EEType AS ET, is_relation AS rel_is0
+WHERE ((EXISTS(SELECT 1 FROM owned_by_relation AS rel_owned_by0 WHERE rel_owned_by0.eid_from=X.cw_eid AND rel_owned_by0.eid_to=1)) OR (((EXISTS(SELECT 1 FROM cw_Affaire AS D LEFT OUTER JOIN concerne_relation AS rel_concerne1 ON (rel_concerne1.eid_from=D.cw_eid) LEFT OUTER JOIN cw_Note AS B ON (rel_concerne1.eid_to=B.cw_eid), owned_by_relation AS rel_owned_by2 WHERE rel_owned_by2.eid_from=B.cw_eid AND rel_owned_by2.eid_to=1 AND X.cw_eid=D.cw_eid)) OR (EXISTS(SELECT 1 FROM cw_Affaire AS F LEFT OUTER JOIN concerne_relation AS rel_concerne3 ON (rel_concerne3.eid_from=F.cw_eid) LEFT OUTER JOIN cw_Societe AS E ON (rel_concerne3.eid_to=E.cw_eid), owned_by_relation AS rel_owned_by4 WHERE rel_owned_by4.eid_from=E.cw_eid AND rel_owned_by4.eid_to=1 AND X.cw_eid=F.cw_eid))))))) AS _T0, cw_CWEType AS ET, is_relation AS rel_is0
 WHERE rel_is0.eid_from=_T0.C0 AND rel_is0.eid_to=ET.cw_eid
 GROUP BY ET.cw_name'''),
             )):
@@ -1389,9 +1389,9 @@
 
 
     def test_from_clause_needed(self):
-        queries = [("Any 1 WHERE EXISTS(T is EGroup, T name 'managers')",
+        queries = [("Any 1 WHERE EXISTS(T is CWGroup, T name 'managers')",
                     '''SELECT 1
-WHERE EXISTS(SELECT 1 FROM cw_EGroup AS T WHERE T.cw_name=managers)'''),
+WHERE EXISTS(SELECT 1 FROM cw_CWGroup AS T WHERE T.cw_name=managers)'''),
                    ('Any X,Y WHERE NOT X created_by Y, X eid 5, Y eid 6',
                     '''SELECT 5, 6
 WHERE NOT EXISTS(SELECT 1 FROM created_by_relation AS rel_created_by0 WHERE rel_created_by0.eid_from=5 AND rel_created_by0.eid_to=6)'''),
@@ -1548,10 +1548,10 @@
         return sql.strip().replace(' ILIKE ', ' LIKE ')
 
     def test_from_clause_needed(self):
-        queries = [("Any 1 WHERE EXISTS(T is EGroup, T name 'managers')",
+        queries = [("Any 1 WHERE EXISTS(T is CWGroup, T name 'managers')",
                     '''SELECT 1
 FROM (SELECT 1) AS _T
-WHERE EXISTS(SELECT 1 FROM cw_EGroup AS T WHERE T.cw_name=managers)'''),
+WHERE EXISTS(SELECT 1 FROM cw_CWGroup AS T WHERE T.cw_name=managers)'''),
                    ('Any X,Y WHERE NOT X created_by Y, X eid 5, Y eid 6',
                     '''SELECT 5, 6
 FROM (SELECT 1) AS _T
--- a/server/test/unittest_rqlannotation.py	Fri Apr 17 13:21:05 2009 +0200
+++ b/server/test/unittest_rqlannotation.py	Fri Apr 17 16:55:37 2009 +0200
@@ -37,7 +37,7 @@
         self.assert_(rqlst.defined_vars['B'].stinfo['attrvar'])
         self.assertEquals(rqlst.defined_vars['C']._q_invariant, False)
         self.assertEquals(rqlst.solutions, [{'A': 'TrInfo', 'B': 'String', 'C': 'Affaire'},
-                                      {'A': 'TrInfo', 'B': 'String', 'C': 'EUser'},
+                                      {'A': 'TrInfo', 'B': 'String', 'C': 'CWUser'},
                                       {'A': 'TrInfo', 'B': 'String', 'C': 'Note'}])
 
     def test_0_5(self):        
@@ -176,7 +176,7 @@
         self.assertEquals(rqlst.defined_vars['Y']._q_invariant, False)
         
     def test_not_relation_4_4(self):
-        rqlst = self._prepare('Any X WHERE NOT Y evaluee X, Y is EUser')
+        rqlst = self._prepare('Any X WHERE NOT Y evaluee X, Y is CWUser')
         self.assertEquals(rqlst.defined_vars['X']._q_invariant, False)
         self.assertEquals(rqlst.defined_vars['Y']._q_invariant, False)
 
@@ -186,12 +186,12 @@
         self.assertEquals(rqlst.solutions, [{'X': 'Note'}])
         
     def test_not_relation_5_1(self):
-        rqlst = self._prepare('Any X,Y WHERE X name "EGroup", Y eid IN(1, 2, 3), NOT X read_permission Y')
+        rqlst = self._prepare('Any X,Y WHERE X name "CWGroup", Y eid IN(1, 2, 3), NOT X read_permission Y')
         self.assertEquals(rqlst.defined_vars['X']._q_invariant, False)
         self.assertEquals(rqlst.defined_vars['Y']._q_invariant, False)
 
     def test_not_relation_5_2(self):
-        rqlst = self._prepare('DISTINCT Any X,Y WHERE X name "EGroup", Y eid IN(1, 2, 3), NOT X read_permission Y')
+        rqlst = self._prepare('DISTINCT Any X,Y WHERE X name "CWGroup", Y eid IN(1, 2, 3), NOT X read_permission Y')
         self.assertEquals(rqlst.defined_vars['X']._q_invariant, False)
         self.assertEquals(rqlst.defined_vars['Y']._q_invariant, False)
 
@@ -201,7 +201,7 @@
         self.assertEquals(rqlst.defined_vars['A']._q_invariant, True)
 
     def test_not_relation_7(self):
-        rqlst = self._prepare('Any K,V WHERE P is EProperty, P pkey K, P value V, NOT P for_user U') 
+        rqlst = self._prepare('Any K,V WHERE P is CWProperty, P pkey K, P value V, NOT P for_user U') 
         self.assertEquals(rqlst.defined_vars['P']._q_invariant, False)
         self.assertEquals(rqlst.defined_vars['U']._q_invariant, True)
        
@@ -221,12 +221,12 @@
         self.assertEquals(rqlst.defined_vars['X']._q_invariant, True)
         
     def test_exists_4(self):
-        rqlst = self._prepare('Any X,Y WHERE X name "EGroup", Y eid IN(1, 2, 3), EXISTS(X read_permission Y)')
+        rqlst = self._prepare('Any X,Y WHERE X name "CWGroup", Y eid IN(1, 2, 3), EXISTS(X read_permission Y)')
         self.assertEquals(rqlst.defined_vars['X']._q_invariant, False)
         self.assertEquals(rqlst.defined_vars['Y']._q_invariant, False)
         
     def test_exists_5(self):
-        rqlst = self._prepare('DISTINCT Any X,Y WHERE X name "EGroup", Y eid IN(1, 2, 3), EXISTS(X read_permission Y)')
+        rqlst = self._prepare('DISTINCT Any X,Y WHERE X name "CWGroup", Y eid IN(1, 2, 3), EXISTS(X read_permission Y)')
         self.assertEquals(rqlst.defined_vars['X']._q_invariant, False)
         self.assertEquals(rqlst.defined_vars['Y']._q_invariant, True)
 
@@ -236,11 +236,11 @@
         self.assertEquals(rqlst.defined_vars['X']._q_invariant, True)        
 
     def test_not_exists_2(self):        
-        rqlst = self._prepare('Any X,Y WHERE X name "EGroup", Y eid IN(1, 2, 3), NOT EXISTS(X read_permission Y)')
+        rqlst = self._prepare('Any X,Y WHERE X name "CWGroup", Y eid IN(1, 2, 3), NOT EXISTS(X read_permission Y)')
         self.assertEquals(rqlst.defined_vars['Y']._q_invariant, False)
 
     def test_not_exists_distinct_1(self):        
-        rqlst = self._prepare('DISTINCT Any X,Y WHERE X name "EGroup", Y eid IN(1, 2, 3), NOT EXISTS(X read_permission Y)')
+        rqlst = self._prepare('DISTINCT Any X,Y WHERE X name "CWGroup", Y eid IN(1, 2, 3), NOT EXISTS(X read_permission Y)')
         self.assertEquals(rqlst.defined_vars['Y']._q_invariant, False)
         
     def test_or_1(self):        
--- a/server/test/unittest_rqlrewrite.py	Fri Apr 17 13:21:05 2009 +0200
+++ b/server/test/unittest_rqlrewrite.py	Fri Apr 17 16:55:37 2009 +0200
@@ -22,7 +22,7 @@
     repotest.undo_monkey_patch()
     
 def eid_func_map(eid):
-    return {1: 'EUser',
+    return {1: 'CWUser',
             2: 'Card'}[eid]
 
 def rewrite(rqlst, snippets_map, kwargs):
@@ -74,7 +74,7 @@
         self.failUnlessEqual(rqlst.as_string(),
                              u"Any C WHERE C is Card, B eid %(D)s, "
                              "EXISTS(C in_state A, B in_group E, F require_state A, "
-                             "F name 'read', F require_group E, A is State, E is EGroup, F is EPermission)")
+                             "F name 'read', F require_group E, A is State, E is CWGroup, F is CWPermission)")
         
     def test_multiple_var(self):
         card_constraint = ('X in_state S, U in_group G, P require_state S,'
@@ -87,8 +87,8 @@
         self.assertTextEquals(rqlst.as_string(),
                              "Any S WHERE S documented_by C, C eid %(u)s, B eid %(D)s, "
                              "EXISTS(C in_state A, B in_group E, F require_state A, "
-                             "F name 'read', F require_group E, A is State, E is EGroup, F is EPermission), "
-                             "(EXISTS(S ref LIKE 'PUBLIC%')) OR (EXISTS(B in_group G, G name 'public', G is EGroup)), "
+                             "F name 'read', F require_group E, A is State, E is CWGroup, F is CWPermission), "
+                             "(EXISTS(S ref LIKE 'PUBLIC%')) OR (EXISTS(B in_group G, G name 'public', G is CWGroup)), "
                              "S is Affaire")
         self.failUnless('D' in kwargs)
         
@@ -99,8 +99,8 @@
         self.failUnlessEqual(rqlst.as_string(),
                              "Any S WHERE S owned_by C, C eid %(u)s, A eid %(B)s, "
                              "EXISTS((C identity A) OR (C in_state D, E identity A, "
-                             "E in_state D, D name 'subscribed'), D is State, E is EUser), "
-                             "S is IN(Affaire, Basket, Bookmark, Card, Comment, Division, ECache, EConstraint, EConstraintType, EEType, EFRDef, EGroup, ENFRDef, EPermission, EProperty, ERType, EUser, Email, EmailAddress, EmailPart, EmailThread, File, Folder, Image, Note, Personne, RQLExpression, Societe, State, SubDivision, Tag, TrInfo, Transition)")
+                             "E in_state D, D name 'subscribed'), D is State, E is CWUser), "
+                             "S is IN(Affaire, Basket, Bookmark, Card, Comment, Division, CWCache, CWConstraint, CWConstraintType, CWEType, CWAttribute, CWGroup, CWRelation, CWPermission, CWProperty, CWRType, CWUser, Email, EmailAddress, EmailPart, EmailThread, File, Folder, Image, Note, Personne, RQLExpression, Societe, State, SubDivision, Tag, TrInfo, Transition)")
 
     def test_simplified_rqlst(self):
         card_constraint = ('X in_state S, U in_group G, P require_state S,'
@@ -110,7 +110,7 @@
         self.failUnlessEqual(rqlst.as_string(),
                              u"Any 2 WHERE B eid %(C)s, "
                              "EXISTS(2 in_state A, B in_group D, E require_state A, "
-                             "E name 'read', E require_group D, A is State, D is EGroup, E is EPermission)")
+                             "E name 'read', E require_group D, A is State, D is CWGroup, E is CWPermission)")
 
     def test_optional_var(self):
         card_constraint = ('X in_state S, U in_group G, P require_state S,'
@@ -141,22 +141,22 @@
         self.failUnlessEqual(rqlst.as_string(),
                              u"Any C WHERE C in_state STATE, C is Card, A eid %(B)s, "
                              "EXISTS(A in_group D, E require_state STATE, "
-                             "E name 'read', E require_group D, D is EGroup, E is EPermission), "
+                             "E name 'read', E require_group D, D is CWGroup, E is CWPermission), "
                              "STATE is State")
 
     def test_unsupported_constraint_1(self):
-        # EUser doesn't have require_permission
+        # CWUser doesn't have require_permission
         trinfo_constraint = ('X wf_info_for Y, Y require_permission P, P name "read"')
-        rqlst = parse('Any U,T WHERE U is EUser, T wf_info_for U')
+        rqlst = parse('Any U,T WHERE U is CWUser, T wf_info_for U')
         self.assertRaises(Unauthorized, rewrite, rqlst, {'T': (trinfo_constraint,)}, {})
         
     def test_unsupported_constraint_2(self):
         trinfo_constraint = ('X wf_info_for Y, Y require_permission P, P name "read"')
-        rqlst = parse('Any U,T WHERE U is EUser, T wf_info_for U')
+        rqlst = parse('Any U,T WHERE U is CWUser, T wf_info_for U')
         rewrite(rqlst, {'T': (trinfo_constraint, 'X wf_info_for Y, Y in_group G, G name "managers"')}, {})
         self.failUnlessEqual(rqlst.as_string(),
-                             u"Any U,T WHERE U is EUser, T wf_info_for U, "
-                             "EXISTS(U in_group B, B name 'managers', B is EGroup), T is TrInfo")
+                             u"Any U,T WHERE U is CWUser, T wf_info_for U, "
+                             "EXISTS(U in_group B, B name 'managers', B is CWGroup), T is TrInfo")
 
     def test_unsupported_constraint_3(self):
         self.skip('raise unauthorized for now')
--- a/server/test/unittest_schemaserial.py	Fri Apr 17 13:21:05 2009 +0200
+++ b/server/test/unittest_schemaserial.py	Fri Apr 17 16:55:37 2009 +0200
@@ -20,16 +20,16 @@
 class Schema2RQLTC(TestCase):
         
     def test_eschema2rql1(self):
-        self.assertListEquals(list(eschema2rql(schema.eschema('EFRDef'))),
+        self.assertListEquals(list(eschema2rql(schema.eschema('CWAttribute'))),
                               [
-            ('INSERT EEType X: X description %(description)s,X final %(final)s,X meta %(meta)s,X name %(name)s',
+            ('INSERT CWEType X: X description %(description)s,X final %(final)s,X meta %(meta)s,X name %(name)s',
              {'description': u'define a final relation: link a final relation type from a non final entity to a final entity type. used to build the application schema',
-              'meta': True, 'name': u'EFRDef', 'final': False})
+              'meta': True, 'name': u'CWAttribute', 'final': False})
             ])
         
     def test_eschema2rql2(self):
         self.assertListEquals(list(eschema2rql(schema.eschema('String'))), [
-                ('INSERT EEType X: X description %(description)s,X final %(final)s,X meta %(meta)s,X name %(name)s',
+                ('INSERT CWEType X: X description %(description)s,X final %(final)s,X meta %(meta)s,X name %(name)s',
                  {'description': u'', 'final': True, 'meta': True, 'name': u'String'})])
     
     def test_eschema2rql_specialization(self):
@@ -43,32 +43,32 @@
     def test_rschema2rql1(self):
         self.assertListEquals(list(rschema2rql(schema.rschema('relation_type'))),
                              [
-            ('INSERT ERType X: X description %(description)s,X final %(final)s,X fulltext_container %(fulltext_container)s,X inlined %(inlined)s,X meta %(meta)s,X name %(name)s,X symetric %(symetric)s',
+            ('INSERT CWRType X: X description %(description)s,X final %(final)s,X fulltext_container %(fulltext_container)s,X inlined %(inlined)s,X meta %(meta)s,X name %(name)s,X symetric %(symetric)s',
              {'description': u'link a relation definition to its relation type', 'meta': True, 'symetric': False, 'name': u'relation_type', 'final' : False, 'fulltext_container': None, 'inlined': True}),
-            ('INSERT ENFRDef X: X cardinality %(cardinality)s,X composite %(composite)s,X description %(description)s,X ordernum %(ordernum)s,X relation_type ER,X from_entity SE,X to_entity OE WHERE SE name %(se)s,ER name %(rt)s,OE name %(oe)s',
-             {'rt': 'relation_type', 'description': u'', 'composite': u'object', 'oe': 'ERType',
-              'ordernum': 1, 'cardinality': u'1*', 'se': 'EFRDef'}),
-            ('INSERT EConstraint X: X value %(value)s, X cstrtype CT, EDEF constrained_by X WHERE CT name %(ctname)s, EDEF relation_type ER, EDEF from_entity SE, EDEF to_entity OE, ER name %(rt)s, SE name %(se)s, OE name %(oe)s, EDEF is ENFRDef',
-             {'rt': 'relation_type', 'oe': 'ERType', 'ctname': u'RQLConstraint', 'se': 'EFRDef', 'value': u'O final TRUE'}),
-            ('INSERT ENFRDef X: X cardinality %(cardinality)s,X composite %(composite)s,X description %(description)s,X ordernum %(ordernum)s,X relation_type ER,X from_entity SE,X to_entity OE WHERE SE name %(se)s,ER name %(rt)s,OE name %(oe)s',
-             {'rt': 'relation_type', 'description': u'', 'composite': u'object', 'oe': 'ERType',
-              'ordernum': 1, 'cardinality': u'1*', 'se': 'ENFRDef'}),
-            ('INSERT EConstraint X: X value %(value)s, X cstrtype CT, EDEF constrained_by X WHERE CT name %(ctname)s, EDEF relation_type ER, EDEF from_entity SE, EDEF to_entity OE, ER name %(rt)s, SE name %(se)s, OE name %(oe)s, EDEF is ENFRDef',
-             {'rt': 'relation_type', 'oe': 'ERType', 'ctname': u'RQLConstraint', 'se': 'ENFRDef', 'value': u'O final FALSE'}),
+            ('INSERT CWRelation X: X cardinality %(cardinality)s,X composite %(composite)s,X description %(description)s,X ordernum %(ordernum)s,X relation_type ER,X from_entity SE,X to_entity OE WHERE SE name %(se)s,ER name %(rt)s,OE name %(oe)s',
+             {'rt': 'relation_type', 'description': u'', 'composite': u'object', 'oe': 'CWRType',
+              'ordernum': 1, 'cardinality': u'1*', 'se': 'CWAttribute'}),
+            ('INSERT CWConstraint X: X value %(value)s, X cstrtype CT, EDEF constrained_by X WHERE CT name %(ctname)s, EDEF relation_type ER, EDEF from_entity SE, EDEF to_entity OE, ER name %(rt)s, SE name %(se)s, OE name %(oe)s, EDEF is CWRelation',
+             {'rt': 'relation_type', 'oe': 'CWRType', 'ctname': u'RQLConstraint', 'se': 'CWAttribute', 'value': u'O final TRUE'}),
+            ('INSERT CWRelation X: X cardinality %(cardinality)s,X composite %(composite)s,X description %(description)s,X ordernum %(ordernum)s,X relation_type ER,X from_entity SE,X to_entity OE WHERE SE name %(se)s,ER name %(rt)s,OE name %(oe)s',
+             {'rt': 'relation_type', 'description': u'', 'composite': u'object', 'oe': 'CWRType',
+              'ordernum': 1, 'cardinality': u'1*', 'se': 'CWRelation'}),
+            ('INSERT CWConstraint X: X value %(value)s, X cstrtype CT, EDEF constrained_by X WHERE CT name %(ctname)s, EDEF relation_type ER, EDEF from_entity SE, EDEF to_entity OE, ER name %(rt)s, SE name %(se)s, OE name %(oe)s, EDEF is CWRelation',
+             {'rt': 'relation_type', 'oe': 'CWRType', 'ctname': u'RQLConstraint', 'se': 'CWRelation', 'value': u'O final FALSE'}),
             ])
         
     def test_rschema2rql2(self):
         expected = [
-            ('INSERT ERType X: X description %(description)s,X final %(final)s,X fulltext_container %(fulltext_container)s,X inlined %(inlined)s,X meta %(meta)s,X name %(name)s,X symetric %(symetric)s', {'description': u'core relation giving to a group the permission to add an entity or relation type', 'meta': True, 'symetric': False, 'name': u'add_permission', 'final': False, 'fulltext_container': None, 'inlined': False}),
-            ('INSERT ENFRDef X: X cardinality %(cardinality)s,X composite %(composite)s,X description %(description)s,X ordernum %(ordernum)s,X relation_type ER,X from_entity SE,X to_entity OE WHERE SE name %(se)s,ER name %(rt)s,OE name %(oe)s',
-             {'rt': 'add_permission', 'description': u'rql expression allowing to add entities/relations of this type', 'composite': 'subject', 'oe': 'RQLExpression', 'ordernum': 5, 'cardinality': u'*?', 'se': 'EEType'}),
-            ('INSERT ENFRDef X: X cardinality %(cardinality)s,X composite %(composite)s,X description %(description)s,X ordernum %(ordernum)s,X relation_type ER,X from_entity SE,X to_entity OE WHERE SE name %(se)s,ER name %(rt)s,OE name %(oe)s',
-             {'rt': 'add_permission', 'description': u'rql expression allowing to add entities/relations of this type', 'composite': 'subject', 'oe': 'RQLExpression', 'ordernum': 5, 'cardinality': u'*?', 'se': 'ERType'}),
+            ('INSERT CWRType X: X description %(description)s,X final %(final)s,X fulltext_container %(fulltext_container)s,X inlined %(inlined)s,X meta %(meta)s,X name %(name)s,X symetric %(symetric)s', {'description': u'core relation giving to a group the permission to add an entity or relation type', 'meta': True, 'symetric': False, 'name': u'add_permission', 'final': False, 'fulltext_container': None, 'inlined': False}),
+            ('INSERT CWRelation X: X cardinality %(cardinality)s,X composite %(composite)s,X description %(description)s,X ordernum %(ordernum)s,X relation_type ER,X from_entity SE,X to_entity OE WHERE SE name %(se)s,ER name %(rt)s,OE name %(oe)s',
+             {'rt': 'add_permission', 'description': u'rql expression allowing to add entities/relations of this type', 'composite': 'subject', 'oe': 'RQLExpression', 'ordernum': 5, 'cardinality': u'*?', 'se': 'CWEType'}),
+            ('INSERT CWRelation X: X cardinality %(cardinality)s,X composite %(composite)s,X description %(description)s,X ordernum %(ordernum)s,X relation_type ER,X from_entity SE,X to_entity OE WHERE SE name %(se)s,ER name %(rt)s,OE name %(oe)s',
+             {'rt': 'add_permission', 'description': u'rql expression allowing to add entities/relations of this type', 'composite': 'subject', 'oe': 'RQLExpression', 'ordernum': 5, 'cardinality': u'*?', 'se': 'CWRType'}),
             
-            ('INSERT ENFRDef X: X cardinality %(cardinality)s,X composite %(composite)s,X description %(description)s,X ordernum %(ordernum)s,X relation_type ER,X from_entity SE,X to_entity OE WHERE SE name %(se)s,ER name %(rt)s,OE name %(oe)s',
-             {'rt': 'add_permission', 'description': u'groups allowed to add entities/relations of this type', 'composite': None, 'oe': 'EGroup', 'ordernum': 3, 'cardinality': u'**', 'se': 'EEType'}),
-            ('INSERT ENFRDef X: X cardinality %(cardinality)s,X composite %(composite)s,X description %(description)s,X ordernum %(ordernum)s,X relation_type ER,X from_entity SE,X to_entity OE WHERE SE name %(se)s,ER name %(rt)s,OE name %(oe)s',
-             {'rt': 'add_permission', 'description': u'groups allowed to add entities/relations of this type', 'composite': None, 'oe': 'EGroup', 'ordernum': 3, 'cardinality': u'**', 'se': 'ERType'}),
+            ('INSERT CWRelation X: X cardinality %(cardinality)s,X composite %(composite)s,X description %(description)s,X ordernum %(ordernum)s,X relation_type ER,X from_entity SE,X to_entity OE WHERE SE name %(se)s,ER name %(rt)s,OE name %(oe)s',
+             {'rt': 'add_permission', 'description': u'groups allowed to add entities/relations of this type', 'composite': None, 'oe': 'CWGroup', 'ordernum': 3, 'cardinality': u'**', 'se': 'CWEType'}),
+            ('INSERT CWRelation X: X cardinality %(cardinality)s,X composite %(composite)s,X description %(description)s,X ordernum %(ordernum)s,X relation_type ER,X from_entity SE,X to_entity OE WHERE SE name %(se)s,ER name %(rt)s,OE name %(oe)s',
+             {'rt': 'add_permission', 'description': u'groups allowed to add entities/relations of this type', 'composite': None, 'oe': 'CWGroup', 'ordernum': 3, 'cardinality': u'**', 'se': 'CWRType'}),
             ]
         for i, (rql, args) in enumerate(rschema2rql(schema.rschema('add_permission'))):
             yield self.assertEquals, (rql, args), expected[i]
@@ -76,41 +76,41 @@
     def test_rschema2rql3(self):
         self.assertListEquals(list(rschema2rql(schema.rschema('cardinality'))), 
                              [
-            ('INSERT ERType X: X description %(description)s,X final %(final)s,X fulltext_container %(fulltext_container)s,X inlined %(inlined)s,X meta %(meta)s,X name %(name)s,X symetric %(symetric)s',
+            ('INSERT CWRType X: X description %(description)s,X final %(final)s,X fulltext_container %(fulltext_container)s,X inlined %(inlined)s,X meta %(meta)s,X name %(name)s,X symetric %(symetric)s',
              {'description': u'', 'meta': False, 'symetric': False, 'name': u'cardinality', 'final': True, 'fulltext_container': None, 'inlined': False}),
 
-            ('INSERT EFRDef X: X cardinality %(cardinality)s,X defaultval %(defaultval)s,X description %(description)s,X fulltextindexed %(fulltextindexed)s,X indexed %(indexed)s,X internationalizable %(internationalizable)s,X ordernum %(ordernum)s,X relation_type ER,X from_entity SE,X to_entity OE WHERE SE name %(se)s,ER name %(rt)s,OE name %(oe)s',
-             {'rt': 'cardinality', 'description': u'subject/object cardinality', 'internationalizable': True, 'fulltextindexed': False, 'ordernum': 5, 'defaultval': None, 'indexed': False, 'cardinality': u'?1', 'oe': 'String', 'se': 'EFRDef'}),
-            ('INSERT EConstraint X: X value %(value)s, X cstrtype CT, EDEF constrained_by X WHERE CT name %(ctname)s, EDEF relation_type ER, EDEF from_entity SE, EDEF to_entity OE, ER name %(rt)s, SE name %(se)s, OE name %(oe)s, EDEF is EFRDef',
-             {'rt': 'cardinality', 'oe': 'String', 'ctname': u'SizeConstraint', 'se': 'EFRDef', 'value': u'max=2'}),
-            ('INSERT EConstraint X: X value %(value)s, X cstrtype CT, EDEF constrained_by X WHERE CT name %(ctname)s, EDEF relation_type ER, EDEF from_entity SE, EDEF to_entity OE, ER name %(rt)s, SE name %(se)s, OE name %(oe)s, EDEF is EFRDef',
-             {'rt': 'cardinality', 'oe': 'String', 'ctname': u'StaticVocabularyConstraint', 'se': 'EFRDef', 'value': u"u'?1', u'11', u'??', u'1?'"}),
+            ('INSERT CWAttribute X: X cardinality %(cardinality)s,X defaultval %(defaultval)s,X description %(description)s,X fulltextindexed %(fulltextindexed)s,X indexed %(indexed)s,X internationalizable %(internationalizable)s,X ordernum %(ordernum)s,X relation_type ER,X from_entity SE,X to_entity OE WHERE SE name %(se)s,ER name %(rt)s,OE name %(oe)s',
+             {'rt': 'cardinality', 'description': u'subject/object cardinality', 'internationalizable': True, 'fulltextindexed': False, 'ordernum': 5, 'defaultval': None, 'indexed': False, 'cardinality': u'?1', 'oe': 'String', 'se': 'CWAttribute'}),
+            ('INSERT CWConstraint X: X value %(value)s, X cstrtype CT, EDEF constrained_by X WHERE CT name %(ctname)s, EDEF relation_type ER, EDEF from_entity SE, EDEF to_entity OE, ER name %(rt)s, SE name %(se)s, OE name %(oe)s, EDEF is CWAttribute',
+             {'rt': 'cardinality', 'oe': 'String', 'ctname': u'SizeConstraint', 'se': 'CWAttribute', 'value': u'max=2'}),
+            ('INSERT CWConstraint X: X value %(value)s, X cstrtype CT, EDEF constrained_by X WHERE CT name %(ctname)s, EDEF relation_type ER, EDEF from_entity SE, EDEF to_entity OE, ER name %(rt)s, SE name %(se)s, OE name %(oe)s, EDEF is CWAttribute',
+             {'rt': 'cardinality', 'oe': 'String', 'ctname': u'StaticVocabularyConstraint', 'se': 'CWAttribute', 'value': u"u'?1', u'11', u'??', u'1?'"}),
 
-            ('INSERT EFRDef X: X cardinality %(cardinality)s,X defaultval %(defaultval)s,X description %(description)s,X fulltextindexed %(fulltextindexed)s,X indexed %(indexed)s,X internationalizable %(internationalizable)s,X ordernum %(ordernum)s,X relation_type ER,X from_entity SE,X to_entity OE WHERE SE name %(se)s,ER name %(rt)s,OE name %(oe)s',
-             {'rt': 'cardinality', 'description': u'subject/object cardinality', 'internationalizable': True, 'fulltextindexed': False, 'ordernum': 5, 'defaultval': None, 'indexed': False, 'cardinality': u'?1', 'oe': 'String', 'se': 'ENFRDef'}),
-            ('INSERT EConstraint X: X value %(value)s, X cstrtype CT, EDEF constrained_by X WHERE CT name %(ctname)s, EDEF relation_type ER, EDEF from_entity SE, EDEF to_entity OE, ER name %(rt)s, SE name %(se)s, OE name %(oe)s, EDEF is EFRDef',
-             {'rt': 'cardinality', 'oe': 'String', 'ctname': u'SizeConstraint', 'se': 'ENFRDef', 'value': u'max=2'}),
-            ('INSERT EConstraint X: X value %(value)s, X cstrtype CT, EDEF constrained_by X WHERE CT name %(ctname)s, EDEF relation_type ER, EDEF from_entity SE, EDEF to_entity OE, ER name %(rt)s, SE name %(se)s, OE name %(oe)s, EDEF is EFRDef',
-             {'rt': 'cardinality', 'oe': 'String', 'ctname': u'StaticVocabularyConstraint', 'se': 'ENFRDef', 'value': u"u'?*', u'1*', u'+*', u'**', u'?+', u'1+', u'++', u'*+', u'?1', u'11', u'+1', u'*1', u'??', u'1?', u'+?', u'*?'"}),
+            ('INSERT CWAttribute X: X cardinality %(cardinality)s,X defaultval %(defaultval)s,X description %(description)s,X fulltextindexed %(fulltextindexed)s,X indexed %(indexed)s,X internationalizable %(internationalizable)s,X ordernum %(ordernum)s,X relation_type ER,X from_entity SE,X to_entity OE WHERE SE name %(se)s,ER name %(rt)s,OE name %(oe)s',
+             {'rt': 'cardinality', 'description': u'subject/object cardinality', 'internationalizable': True, 'fulltextindexed': False, 'ordernum': 5, 'defaultval': None, 'indexed': False, 'cardinality': u'?1', 'oe': 'String', 'se': 'CWRelation'}),
+            ('INSERT CWConstraint X: X value %(value)s, X cstrtype CT, EDEF constrained_by X WHERE CT name %(ctname)s, EDEF relation_type ER, EDEF from_entity SE, EDEF to_entity OE, ER name %(rt)s, SE name %(se)s, OE name %(oe)s, EDEF is CWAttribute',
+             {'rt': 'cardinality', 'oe': 'String', 'ctname': u'SizeConstraint', 'se': 'CWRelation', 'value': u'max=2'}),
+            ('INSERT CWConstraint X: X value %(value)s, X cstrtype CT, EDEF constrained_by X WHERE CT name %(ctname)s, EDEF relation_type ER, EDEF from_entity SE, EDEF to_entity OE, ER name %(rt)s, SE name %(se)s, OE name %(oe)s, EDEF is CWAttribute',
+             {'rt': 'cardinality', 'oe': 'String', 'ctname': u'StaticVocabularyConstraint', 'se': 'CWRelation', 'value': u"u'?*', u'1*', u'+*', u'**', u'?+', u'1+', u'++', u'*+', u'?1', u'11', u'+1', u'*1', u'??', u'1?', u'+?', u'*?'"}),
             ])
         
 
     def test_updateeschema2rql1(self):
-        self.assertListEquals(list(updateeschema2rql(schema.eschema('EFRDef'))),
-                              [('SET X description %(description)s,X final %(final)s,X meta %(meta)s,X name %(name)s WHERE X is EEType, X name %(et)s',
-                                {'description': u'define a final relation: link a final relation type from a non final entity to a final entity type. used to build the application schema', 'meta': True, 'et': 'EFRDef', 'final': False, 'name': u'EFRDef'}),
+        self.assertListEquals(list(updateeschema2rql(schema.eschema('CWAttribute'))),
+                              [('SET X description %(description)s,X final %(final)s,X meta %(meta)s,X name %(name)s WHERE X is CWEType, X name %(et)s',
+                                {'description': u'define a final relation: link a final relation type from a non final entity to a final entity type. used to build the application schema', 'meta': True, 'et': 'CWAttribute', 'final': False, 'name': u'CWAttribute'}),
                                ])
         
     def test_updateeschema2rql2(self):
         self.assertListEquals(list(updateeschema2rql(schema.eschema('String'))),
-                              [('SET X description %(description)s,X final %(final)s,X meta %(meta)s,X name %(name)s WHERE X is EEType, X name %(et)s',
+                              [('SET X description %(description)s,X final %(final)s,X meta %(meta)s,X name %(name)s WHERE X is CWEType, X name %(et)s',
                                 {'description': u'', 'meta': True, 'et': 'String', 'final': True, 'name': u'String'})
                                ])
         
     def test_updaterschema2rql1(self):
         self.assertListEquals(list(updaterschema2rql(schema.rschema('relation_type'))),
                              [
-            ('SET X description %(description)s,X final %(final)s,X fulltext_container %(fulltext_container)s,X inlined %(inlined)s,X meta %(meta)s,X name %(name)s,X symetric %(symetric)s WHERE X is ERType, X name %(rt)s',
+            ('SET X description %(description)s,X final %(final)s,X fulltext_container %(fulltext_container)s,X inlined %(inlined)s,X meta %(meta)s,X name %(name)s,X symetric %(symetric)s WHERE X is CWRType, X name %(rt)s',
              {'rt': 'relation_type', 'symetric': False,
               'description': u'link a relation definition to its relation type',
               'meta': True, 'final': False, 'fulltext_container': None, 'inlined': True, 'name': u'relation_type'})
@@ -118,7 +118,7 @@
         
     def test_updaterschema2rql2(self):
         expected = [
-            ('SET X description %(description)s,X final %(final)s,X fulltext_container %(fulltext_container)s,X inlined %(inlined)s,X meta %(meta)s,X name %(name)s,X symetric %(symetric)s WHERE X is ERType, X name %(rt)s',
+            ('SET X description %(description)s,X final %(final)s,X fulltext_container %(fulltext_container)s,X inlined %(inlined)s,X meta %(meta)s,X name %(name)s,X symetric %(symetric)s WHERE X is CWRType, X name %(rt)s',
              {'rt': 'add_permission', 'symetric': False,
               'description': u'core relation giving to a group the permission to add an entity or relation type',
               'meta': True, 'final': False, 'fulltext_container': None, 'inlined': False, 'name': u'add_permission'})
@@ -135,41 +135,41 @@
         }
     
     def test_eperms2rql1(self):
-        self.assertListEquals([rql for rql, kwargs in erperms2rql(schema.eschema('EEType'), self.GROUP_MAPPING)],
-                              ['SET X read_permission Y WHERE X is EEType, X name "EEType", Y eid 2',
-                               'SET X read_permission Y WHERE X is EEType, X name "EEType", Y eid 0',
-                               'SET X read_permission Y WHERE X is EEType, X name "EEType", Y eid 1',
-                               'SET X add_permission Y WHERE X is EEType, X name "EEType", Y eid 0',
-                               'SET X update_permission Y WHERE X is EEType, X name "EEType", Y eid 0',
-                               'SET X update_permission Y WHERE X is EEType, X name "EEType", Y eid 3',
-                               'SET X delete_permission Y WHERE X is EEType, X name "EEType", Y eid 0',
+        self.assertListEquals([rql for rql, kwargs in erperms2rql(schema.eschema('CWEType'), self.GROUP_MAPPING)],
+                              ['SET X read_permission Y WHERE X is CWEType, X name "CWEType", Y eid 2',
+                               'SET X read_permission Y WHERE X is CWEType, X name "CWEType", Y eid 0',
+                               'SET X read_permission Y WHERE X is CWEType, X name "CWEType", Y eid 1',
+                               'SET X add_permission Y WHERE X is CWEType, X name "CWEType", Y eid 0',
+                               'SET X update_permission Y WHERE X is CWEType, X name "CWEType", Y eid 0',
+                               'SET X update_permission Y WHERE X is CWEType, X name "CWEType", Y eid 3',
+                               'SET X delete_permission Y WHERE X is CWEType, X name "CWEType", Y eid 0',
                                ])
         
     def test_rperms2rql2(self):
         self.assertListEquals([rql for rql, kwargs in erperms2rql(schema.rschema('read_permission'), self.GROUP_MAPPING)],
-                              ['SET X read_permission Y WHERE X is ERType, X name "read_permission", Y eid 2',
-                               'SET X read_permission Y WHERE X is ERType, X name "read_permission", Y eid 0',
-                               'SET X read_permission Y WHERE X is ERType, X name "read_permission", Y eid 1',
-                               'SET X add_permission Y WHERE X is ERType, X name "read_permission", Y eid 0',
-                               'SET X delete_permission Y WHERE X is ERType, X name "read_permission", Y eid 0',
+                              ['SET X read_permission Y WHERE X is CWRType, X name "read_permission", Y eid 2',
+                               'SET X read_permission Y WHERE X is CWRType, X name "read_permission", Y eid 0',
+                               'SET X read_permission Y WHERE X is CWRType, X name "read_permission", Y eid 1',
+                               'SET X add_permission Y WHERE X is CWRType, X name "read_permission", Y eid 0',
+                               'SET X delete_permission Y WHERE X is CWRType, X name "read_permission", Y eid 0',
                                ])
         
     def test_rperms2rql3(self):
         self.assertListEquals([rql for rql, kwargs in erperms2rql(schema.rschema('name'), self.GROUP_MAPPING)],
-                              ['SET X read_permission Y WHERE X is ERType, X name "name", Y eid 2',
-                               'SET X read_permission Y WHERE X is ERType, X name "name", Y eid 0',
-                               'SET X read_permission Y WHERE X is ERType, X name "name", Y eid 1',
-                               'SET X add_permission Y WHERE X is ERType, X name "name", Y eid 2',
-                               'SET X add_permission Y WHERE X is ERType, X name "name", Y eid 0',
-                               'SET X add_permission Y WHERE X is ERType, X name "name", Y eid 1',
-                               'SET X delete_permission Y WHERE X is ERType, X name "name", Y eid 2',
-                               'SET X delete_permission Y WHERE X is ERType, X name "name", Y eid 0',
-                               'SET X delete_permission Y WHERE X is ERType, X name "name", Y eid 1',
+                              ['SET X read_permission Y WHERE X is CWRType, X name "name", Y eid 2',
+                               'SET X read_permission Y WHERE X is CWRType, X name "name", Y eid 0',
+                               'SET X read_permission Y WHERE X is CWRType, X name "name", Y eid 1',
+                               'SET X add_permission Y WHERE X is CWRType, X name "name", Y eid 2',
+                               'SET X add_permission Y WHERE X is CWRType, X name "name", Y eid 0',
+                               'SET X add_permission Y WHERE X is CWRType, X name "name", Y eid 1',
+                               'SET X delete_permission Y WHERE X is CWRType, X name "name", Y eid 2',
+                               'SET X delete_permission Y WHERE X is CWRType, X name "name", Y eid 0',
+                               'SET X delete_permission Y WHERE X is CWRType, X name "name", Y eid 1',
                                ])
         
     #def test_perms2rql(self):
     #    self.assertListEquals(perms2rql(schema, self.GROUP_MAPPING),
-    #                         ['INSERT EEType X: X name 'Societe', X final FALSE'])
+    #                         ['INSERT CWEType X: X name 'Societe', X final FALSE'])
         
 
 
--- a/server/test/unittest_security.py	Fri Apr 17 13:21:05 2009 +0200
+++ b/server/test/unittest_security.py	Fri Apr 17 16:55:37 2009 +0200
@@ -41,12 +41,12 @@
             
     def test_upassword_not_selectable(self):
         self.assertRaises(Unauthorized,
-                          self.execute, 'Any X,P WHERE X is EUser, X upassword P')
+                          self.execute, 'Any X,P WHERE X is CWUser, X upassword P')
         self.rollback()
         cnx = self.login('iaminusersgrouponly')
         cu = cnx.cursor()
         self.assertRaises(Unauthorized,
-                          cu.execute, 'Any X,P WHERE X is EUser, X upassword P')
+                          cu.execute, 'Any X,P WHERE X is CWUser, X upassword P')
         
     
 class SecurityTC(BaseSecurityTC):
@@ -57,7 +57,7 @@
         self.execute("INSERT Affaire X: X sujet 'cool'")
         self.execute("INSERT Societe X: X nom 'logilab'")
         self.execute("INSERT Personne X: X nom 'bidule'")
-        self.execute('INSERT EGroup X: X name "staff"')
+        self.execute('INSERT CWGroup X: X name "staff"')
         self.commit()
 
     def test_insert_security(self):
@@ -134,11 +134,11 @@
         # exception is raised
         #user._groups = {'guests':1}
         #self.assertRaises(Unauthorized,
-        #                  self.o.execute, user, "DELETE EUser X WHERE X login 'bidule'")
+        #                  self.o.execute, user, "DELETE CWUser X WHERE X login 'bidule'")
         # check local security
         cnx = self.login('iaminusersgrouponly')
         cu = cnx.cursor()
-        self.assertRaises(Unauthorized, cu.execute, "DELETE EGroup Y WHERE Y name 'staff'")
+        self.assertRaises(Unauthorized, cu.execute, "DELETE CWGroup Y WHERE Y name 'staff'")
         
     def test_delete_rql_permission(self):
         self.execute("SET A concerne S WHERE A is Affaire, S is Societe")
@@ -369,11 +369,11 @@
 
     def test_attribute_read_security(self):
         # anon not allowed to see users'login, but they can see users
-        self.repo.schema['EUser'].set_groups('read', ('guests', 'users', 'managers'))
+        self.repo.schema['CWUser'].set_groups('read', ('guests', 'users', 'managers'))
         self.repo.schema['login'].set_groups('read', ('users', 'managers'))
         cnx = self.login('anon')
         cu = cnx.cursor()
-        rset = cu.execute('EUser X')
+        rset = cu.execute('CWUser X')
         self.failUnless(rset)
         x = rset.get_entity(0, 0)
         self.assertEquals(x.login, None)
@@ -420,20 +420,20 @@
         # anonymous user can only read itself
         rset = cu.execute('Any L WHERE X owned_by U, U login L')
         self.assertEquals(rset.rows, [['anon']])
-        rset = cu.execute('EUser X')
+        rset = cu.execute('CWUser X')
         self.assertEquals(rset.rows, [[anon.eid]])
         # anonymous user can read groups (necessary to check allowed transitions for instance)
-        self.assert_(cu.execute('EGroup X'))
+        self.assert_(cu.execute('CWGroup X'))
         # should only be able to read the anonymous user, not another one
         origuser = self.session.user
         self.assertRaises(Unauthorized, 
-                          cu.execute, 'EUser X WHERE X eid %(x)s', {'x': origuser.eid}, 'x')
+                          cu.execute, 'CWUser X WHERE X eid %(x)s', {'x': origuser.eid}, 'x')
         # nothing selected, nothing updated, no exception raised
         #self.assertRaises(Unauthorized,
         #                  cu.execute, 'SET X login "toto" WHERE X eid %(x)s',
         #                  {'x': self.user.eid})
         
-        rset = cu.execute('EUser X WHERE X eid %(x)s', {'x': anon.eid}, 'x')
+        rset = cu.execute('CWUser X WHERE X eid %(x)s', {'x': anon.eid}, 'x')
         self.assertEquals(rset.rows, [[anon.eid]])
         # but can't modify it
         cu.execute('SET X login "toto" WHERE X eid %(x)s', {'x': anon.eid})
--- a/server/test/unittest_session.py	Fri Apr 17 13:21:05 2009 +0200
+++ b/server/test/unittest_session.py	Fri Apr 17 16:55:37 2009 +0200
@@ -21,9 +21,9 @@
 
 class MakeDescriptionTC(TestCase):
     def test_known_values(self):
-        solution = {'A': 'Int', 'B': 'EUser'}
+        solution = {'A': 'Int', 'B': 'CWUser'}
         self.assertEquals(_make_description((Function('max', 'A'), Variable('B')), {}, solution),
-                          ['Int','EUser'])
+                          ['Int','CWUser'])
 
 if __name__ == '__main__':
     unittest_main()
--- a/server/test/unittest_ssplanner.py	Fri Apr 17 13:21:05 2009 +0200
+++ b/server/test/unittest_ssplanner.py	Fri Apr 17 16:55:37 2009 +0200
@@ -21,12 +21,12 @@
         self._test('Any XN ORDERBY XN WHERE X name XN',
                    [('OneFetchStep', [('Any XN ORDERBY XN WHERE X name XN',
                                        [{'X': 'Basket', 'XN': 'String'},
-                                        {'X': 'ECache', 'XN': 'String'},
-                                        {'X': 'EConstraintType', 'XN': 'String'},
-                                        {'X': 'EEType', 'XN': 'String'},
-                                        {'X': 'EGroup', 'XN': 'String'},
-                                        {'X': 'EPermission', 'XN': 'String'},
-                                        {'X': 'ERType', 'XN': 'String'},
+                                        {'X': 'CWCache', 'XN': 'String'},
+                                        {'X': 'CWConstraintType', 'XN': 'String'},
+                                        {'X': 'CWEType', 'XN': 'String'},
+                                        {'X': 'CWGroup', 'XN': 'String'},
+                                        {'X': 'CWPermission', 'XN': 'String'},
+                                        {'X': 'CWRType', 'XN': 'String'},
                                         {'X': 'File', 'XN': 'String'},
                                         {'X': 'Folder', 'XN': 'String'},
                                         {'X': 'Image', 'XN': 'String'},
@@ -40,12 +40,12 @@
         self._test('Any XN,COUNT(X) GROUPBY XN WHERE X name XN',
                    [('OneFetchStep', [('Any XN,COUNT(X) GROUPBY XN WHERE X name XN',
                                        [{'X': 'Basket', 'XN': 'String'},
-                                        {'X': 'ECache', 'XN': 'String'},
-                                        {'X': 'EConstraintType', 'XN': 'String'},
-                                        {'X': 'EEType', 'XN': 'String'},
-                                        {'X': 'EGroup', 'XN': 'String'},
-                                        {'X': 'EPermission', 'XN': 'String'},
-                                        {'X': 'ERType', 'XN': 'String'},
+                                        {'X': 'CWCache', 'XN': 'String'},
+                                        {'X': 'CWConstraintType', 'XN': 'String'},
+                                        {'X': 'CWEType', 'XN': 'String'},
+                                        {'X': 'CWGroup', 'XN': 'String'},
+                                        {'X': 'CWPermission', 'XN': 'String'},
+                                        {'X': 'CWRType', 'XN': 'String'},
                                         {'X': 'File', 'XN': 'String'},
                                         {'X': 'Folder', 'XN': 'String'},
                                         {'X': 'Image', 'XN': 'String'},
--- a/skeleton/migration/precreate.py	Fri Apr 17 13:21:05 2009 +0200
+++ b/skeleton/migration/precreate.py	Fri Apr 17 16:55:37 2009 +0200
@@ -1,3 +1,3 @@
 # Instructions here will be read before reading the schema
 # You could create your own groups here, like in :
-#   add_entity('EGroup', name=u'mygroup')
+#   add_entity('CWGroup', name=u'mygroup')
--- a/sobjects/hooks.py	Fri Apr 17 13:21:05 2009 +0200
+++ b/sobjects/hooks.py	Fri Apr 17 16:55:37 2009 +0200
@@ -11,10 +11,10 @@
 from cubicweb.server.pool import PreCommitOperation
 
 
-class AddUpdateEUserHook(Hook):
+class AddUpdateCWUserHook(Hook):
     """ensure user logins are stripped"""
     events = ('before_add_entity', 'before_update_entity',)
-    accepts = ('EUser',)
+    accepts = ('CWUser',)
     
     def call(self, session, entity):
         if 'login' in entity and entity['login']:
--- a/sobjects/notification.py	Fri Apr 17 13:21:05 2009 +0200
+++ b/sobjects/notification.py	Fri Apr 17 16:55:37 2009 +0200
@@ -37,7 +37,7 @@
     """
     id = 'recipients_finder'
     __select__ = yes()
-    user_rql = ('Any X,E,A WHERE X is EUser, X in_state S, S name "activated",'
+    user_rql = ('Any X,E,A WHERE X is CWUser, X in_state S, S name "activated",'
                 'X primary_email E, E address A')
     
     def recipients(self):
--- a/sobjects/supervising.py	Fri Apr 17 13:21:05 2009 +0200
+++ b/sobjects/supervising.py	Fri Apr 17 16:55:37 2009 +0200
@@ -29,7 +29,7 @@
             SupervisionMailOp(session)
         
     def _call(self, *args):
-        if self._event() == 'update_entity' and args[0].e_schema == 'EUser':
+        if self._event() == 'update_entity' and args[0].e_schema == 'CWUser':
             updated = set(args[0].iterkeys())
             if not (updated - frozenset(('eid', 'modification_date', 'last_login_time'))):
                 # don't record last_login_time update which are done 
--- a/sobjects/test/data/sobjects/__init__.py	Fri Apr 17 13:21:05 2009 +0200
+++ b/sobjects/test/data/sobjects/__init__.py	Fri Apr 17 16:55:37 2009 +0200
@@ -1,6 +1,6 @@
 from cubicweb.sobjects.notification import StatusChangeMixIn, NotificationView
 
 class UserStatusChangeView(StatusChangeMixIn, NotificationView):
-    accepts = ('EUser',)
+    accepts = ('CWUser',)
     
     
--- a/sobjects/test/unittest_notification.py	Fri Apr 17 13:21:05 2009 +0200
+++ b/sobjects/test/unittest_notification.py	Fri Apr 17 16:55:37 2009 +0200
@@ -43,10 +43,10 @@
 
 class RecipientsFinderTC(EnvBasedTC):
     def test(self):
-        urset = self.execute('EUser X WHERE X login "admin"')
+        urset = self.execute('CWUser X WHERE X login "admin"')
         self.execute('INSERT EmailAddress X: X address "admin@logilab.fr", U primary_email X '
                      'WHERE U eid %(x)s', {'x': urset[0][0]})
-        self.execute('INSERT EProperty X: X pkey "ui.language", X value "fr", X for_user U '
+        self.execute('INSERT CWProperty X: X pkey "ui.language", X value "fr", X for_user U '
                      'WHERE U eid %(x)s', {'x': urset[0][0]})
         self.commit() # commit so that admin get its properties updated
         finder = self.vreg.select_component('recipients_finder', self.request(), urset)
--- a/sobjects/test/unittest_supervising.py	Fri Apr 17 13:21:05 2009 +0200
+++ b/sobjects/test/unittest_supervising.py	Fri Apr 17 16:55:37 2009 +0200
@@ -21,7 +21,7 @@
     def test_supervision(self):
         session = self.session()
         # do some modification
-        ueid = self.execute('INSERT EUser X: X login "toto", X upassword "sosafe", X in_group G, X in_state S '
+        ueid = self.execute('INSERT CWUser X: X login "toto", X upassword "sosafe", X in_group G, X in_state S '
                             'WHERE G name "users", S name "activated"')[0][0]        
         self.execute('SET X last_login_time NOW WHERE X eid %(x)s', {'x': ueid}, 'x')
         self.execute('SET X in_state S WHERE X login "anon", S name "deactivated"')
--- a/test/data/schema.py	Fri Apr 17 13:21:05 2009 +0200
+++ b/test/data/schema.py	Fri Apr 17 16:55:37 2009 +0200
@@ -23,5 +23,5 @@
     object = ('Personne', 'Note')
 
 class evaluee(RelationDefinition):
-    subject = 'EUser'
+    subject = 'CWUser'
     object = 'Note'
--- a/test/unittest_dbapi.py	Fri Apr 17 13:21:05 2009 +0200
+++ b/test/unittest_dbapi.py	Fri Apr 17 16:55:37 2009 +0200
@@ -29,7 +29,7 @@
     def test_api(self):
         cnx = self.cnx
         self.assertEquals(cnx.user(None).login, 'anon')
-        self.assertEquals(cnx.describe(1), (u'EGroup', u'system', None))
+        self.assertEquals(cnx.describe(1), (u'CWGroup', u'system', None))
         self.restore_connection() # proper way to close cnx
         self.assertRaises(ConnectionError, cnx.user, None)
         self.assertRaises(ConnectionError, cnx.describe, 1)
@@ -73,7 +73,7 @@
 
 #     def test_api(self):
 #         cu = self.cursor
-#         self.assertEquals(cu.describe(1), (u'EGroup', u'system', None))
+#         self.assertEquals(cu.describe(1), (u'CWGroup', u'system', None))
 #         #cu.close()
 #         #self.assertRaises(ConnectionError, cu.describe, 1)
 
--- a/test/unittest_entity.py	Fri Apr 17 13:21:05 2009 +0200
+++ b/test/unittest_entity.py	Fri Apr 17 16:55:37 2009 +0200
@@ -17,7 +17,7 @@
 ##                         embed=False)
     
     def test_boolean_value(self):
-        e = self.etype_instance('EUser')
+        e = self.etype_instance('CWUser')
         self.failUnless(e)
 
     def test_yams_inheritance(self):
@@ -28,7 +28,7 @@
         self.assertIs(e.__class__, e2.__class__)
 
     def test_has_eid(self):
-        e = self.etype_instance('EUser')
+        e = self.etype_instance('CWUser')
         self.assertEquals(e.eid, None)
         self.assertEquals(e.has_eid(), False)
         e.eid = 'X'
@@ -68,7 +68,7 @@
         e = self.entity('Any X WHERE X eid %(x)s', {'x':user.eid}, 'x')
         self.assertEquals(e.use_email[0].address, "toto@logilab.org")
         self.assertEquals(e.use_email[0].eid, adeleid)
-        usereid = self.execute('INSERT EUser X: X login "toto", X upassword "toto", X in_group G, X in_state S '
+        usereid = self.execute('INSERT CWUser X: X login "toto", X upassword "toto", X in_group G, X in_state S '
                                'WHERE G name "users", S name "activated"')[0][0]
         e = self.entity('Any X WHERE X eid %(x)s', {'x':usereid}, 'x')
         e.copy_relations(user.eid)
@@ -77,12 +77,12 @@
         
     def test_copy_with_non_initial_state(self):
         user = self.user()
-        eid = self.execute('INSERT EUser X: X login "toto", X upassword %(pwd)s, X in_group G WHERE G name "users"',
+        eid = self.execute('INSERT CWUser X: X login "toto", X upassword %(pwd)s, X in_group G WHERE G name "users"',
                            {'pwd': 'toto'})[0][0]
         self.commit()
         self.execute('SET X in_state S WHERE X eid %(x)s, S name "deactivated"', {'x': eid}, 'x')
         self.commit()
-        eid2 = self.execute('INSERT EUser X: X login "tutu", X upassword %(pwd)s', {'pwd': 'toto'})[0][0]
+        eid2 = self.execute('INSERT CWUser X: X login "tutu", X upassword %(pwd)s', {'pwd': 'toto'})[0][0]
         e = self.entity('Any X WHERE X eid %(x)s', {'x': eid2}, 'x')
         e.copy_relations(eid)
         self.commit()
@@ -200,8 +200,8 @@
                           1)
         
     def test_new_entity_unrelated(self):
-        e = self.etype_instance('EUser')
-        unrelated = [r[0] for r in e.unrelated('in_group', 'EGroup', 'subject')]
+        e = self.etype_instance('CWUser')
+        unrelated = [r[0] for r in e.unrelated('in_group', 'CWGroup', 'subject')]
         # should be default groups but owners, i.e. managers, users, guests
         self.assertEquals(len(unrelated), 3)
 
@@ -210,10 +210,10 @@
                             content_format=u'text/rest')
         self.assertEquals(e.printable_value('content'),
                           '<p>du <a class="reference" href="http://testing.fr/cubicweb/egroup/managers">*ReST*</a></p>\n')
-        e['content'] = 'du <em>html</em> <ref rql="EUser X">users</ref>'
+        e['content'] = 'du <em>html</em> <ref rql="CWUser X">users</ref>'
         e['content_format'] = 'text/html'
         self.assertEquals(e.printable_value('content'),
-                          'du <em>html</em> <a href="http://testing.fr/cubicweb/view?rql=EUser%20X">users</a>')
+                          'du <em>html</em> <a href="http://testing.fr/cubicweb/view?rql=CWUser%20X">users</a>')
         e['content'] = 'du *texte*'
         e['content_format'] = 'text/plain'
         self.assertEquals(e.printable_value('content'),
@@ -341,7 +341,7 @@
 
     def test_request_cache(self):
         req = self.request()
-        user = self.entity('EUser X WHERE X login "admin"', req=req)
+        user = self.entity('CWUser X WHERE X login "admin"', req=req)
         state = user.in_state[0]
         samestate = self.entity('State X WHERE X name "activated"', req=req)
         self.failUnless(state is samestate)
--- a/test/unittest_rset.py	Fri Apr 17 13:21:05 2009 +0200
+++ b/test/unittest_rset.py	Fri Apr 17 16:55:37 2009 +0200
@@ -26,8 +26,8 @@
     def test_relations_description(self):
         """tests relations_description() function"""
         queries = {
-            'Any U,L,M where U is EUser, U login L, U mail M' : [(1, 'login', 'subject'), (2, 'mail', 'subject')],
-            'Any U,L,M where U is EUser, L is Foo, U mail M' : [(2, 'mail', 'subject')],
+            'Any U,L,M where U is CWUser, U login L, U mail M' : [(1, 'login', 'subject'), (2, 'mail', 'subject')],
+            'Any U,L,M where U is CWUser, L is Foo, U mail M' : [(2, 'mail', 'subject')],
             'Any C,P where C is Company, C employs P' : [(1, 'employs', 'subject')],
             'Any C,P where C is Company, P employed_by P' : [],
             'Any C where C is Company, C employs P' : [],
@@ -39,7 +39,7 @@
     def test_relations_description_indexed(self):
         """tests relations_description() function"""
         queries = {
-            'Any C,U,P,L,M where C is Company, C employs P, U is EUser, U login L, U mail M' :
+            'Any C,U,P,L,M where C is Company, C employs P, U is CWUser, U login L, U mail M' :
             {0: [(2,'employs', 'subject')], 1: [(3,'login', 'subject'), (4,'mail', 'subject')]},
             }
         for rql, results in queries.items():
@@ -54,8 +54,8 @@
     def setUp(self):
         super(ResultSetTC, self).setUp()
         self.rset = ResultSet([[12, 'adim'], [13, 'syt']],
-                              'Any U,L where U is EUser, U login L',
-                              description=[['EUser', 'String'], ['Bar', 'String']])
+                              'Any U,L where U is CWUser, U login L',
+                              description=[['CWUser', 'String'], ['Bar', 'String']])
         self.rset.vreg = self.vreg
 
     def compare_urls(self, url1, url2):
@@ -83,16 +83,16 @@
         
     def test_resultset_build(self):
         """test basic build of a ResultSet"""
-        rs = ResultSet([1,2,3], 'EGroup X', description=['EGroup', 'EGroup', 'EGroup'])
+        rs = ResultSet([1,2,3], 'CWGroup X', description=['CWGroup', 'CWGroup', 'CWGroup'])
         self.assertEquals(rs.rowcount, 3)
         self.assertEquals(rs.rows, [1,2,3])
-        self.assertEquals(rs.description, ['EGroup', 'EGroup', 'EGroup'])
+        self.assertEquals(rs.description, ['CWGroup', 'CWGroup', 'CWGroup'])
 
 
     def test_resultset_limit(self):
         rs = ResultSet([[12000, 'adim'], [13000, 'syt'], [14000, 'nico']],
-                       'Any U,L where U is EUser, U login L',
-                       description=[['EUser', 'String']] * 3)
+                       'Any U,L where U is CWUser, U login L',
+                       description=[['CWUser', 'String']] * 3)
         rs.req = self.request()
         rs.vreg = self.env.vreg
 
@@ -106,8 +106,8 @@
 
     def test_resultset_filter(self):
         rs = ResultSet([[12000, 'adim'], [13000, 'syt'], [14000, 'nico']],
-                       'Any U,L where U is EUser, U login L',
-                       description=[['EUser', 'String']] * 3)
+                       'Any U,L where U is CWUser, U login L',
+                       description=[['CWUser', 'String']] * 3)
         rs.req = self.request()
         rs.vreg = self.env.vreg
         def test_filter(entity):
@@ -119,8 +119,8 @@
         
     def test_resultset_transform(self):
         rs = ResultSet([[12, 'adim'], [13, 'syt'], [14, 'nico']],
-                       'Any U,L where U is EUser, U login L',
-                       description=[['EUser', 'String']] * 3)
+                       'Any U,L where U is CWUser, U login L',
+                       description=[['CWUser', 'String']] * 3)
         rs.req = self.request()
         def test_transform(row, desc):
             return row[1:], desc[1:]
@@ -131,8 +131,8 @@
         
     def test_resultset_sort(self):
         rs = ResultSet([[12000, 'adim'], [13000, 'syt'], [14000, 'nico']],
-                       'Any U,L where U is EUser, U login L',
-                       description=[['EUser', 'String']] * 3)
+                       'Any U,L where U is CWUser, U login L',
+                       description=[['CWUser', 'String']] * 3)
         rs.req = self.request()
         rs.vreg = self.env.vreg
         
@@ -160,9 +160,9 @@
                         [13000, 'syt',  u'Le carrelage en 42 leçons'],
                         [14000, 'nico', u'La tarte tatin en 15 minutes'],
                         [14000, 'nico', u"L'épluchage du castor commun"]],
-                       'Any U, L, T WHERE U is EUser, U login L,'\
+                       'Any U, L, T WHERE U is CWUser, U login L,'\
                        'D created_by U, D title T',
-                       description=[['EUser', 'String', 'String']] * 5)
+                       description=[['CWUser', 'String', 'String']] * 5)
         rs.req = self.request()
         rs.vreg = self.env.vreg
         
@@ -206,7 +206,7 @@
         self.assert_(rqlst1 is rqlst2)
 
     def test_get_entity_simple(self):
-        self.add_entity('EUser', login=u'adim', upassword='adim',
+        self.add_entity('CWUser', login=u'adim', upassword='adim',
                         surname=u'di mascio', firstname=u'adrien')
         e = self.entity('Any X,T WHERE X login "adim", X surname T')
         self.assertEquals(e['surname'], 'di mascio')
@@ -251,7 +251,7 @@
         rset = self.execute('Any X,S WHERE X in_state S, X login "anon"')
         e = rset.get_entity(0, 0)
         seid = self.execute('State X WHERE X name "activated"')[0][0]
-        # for_user / in_group are prefetched in EUser __init__, in_state should
+        # for_user / in_group are prefetched in CWUser __init__, in_state should
         # be filed from our query rset
         self.assertEquals(pprelcachedict(e._related_cache),
                           [('in_state_subject', [seid])])
@@ -276,7 +276,7 @@
 
         
     def test_get_entity_cache_with_left_outer_join(self):
-        eid = self.execute('INSERT EUser E: E login "joe", E upassword "joe", E in_group G '
+        eid = self.execute('INSERT CWUser E: E login "joe", E upassword "joe", E in_group G '
                            'WHERE G name "users"')[0][0]
         rset = self.execute('Any X,E WHERE X eid %(x)s, X primary_email E?', {'x': eid})
         e = rset.get_entity(0, 0)
@@ -294,10 +294,10 @@
         rset = self.execute('Any X,N ORDERBY N WITH X,N BEING '
                             '((Any X,N WHERE X is Bookmark, X title N)'
                             ' UNION '
-                            ' (Any X,N WHERE X is EGroup, X name N))')
-        expected = (('EGroup', 'guests'), ('EGroup', 'managers'),
-                    ('Bookmark', 'manger'), ('EGroup', 'owners'),
-                    ('EGroup', 'users'))
+                            ' (Any X,N WHERE X is CWGroup, X name N))')
+        expected = (('CWGroup', 'guests'), ('CWGroup', 'managers'),
+                    ('Bookmark', 'manger'), ('CWGroup', 'owners'),
+                    ('CWGroup', 'users'))
         for entity in rset.entities(): # test get_entity for each row actually
             etype, n = expected[entity.row]
             self.assertEquals(entity.id, etype)
@@ -314,17 +314,17 @@
     def test_related_entity_union_subquery(self):
         e = self.add_entity('Bookmark', title=u'aaaa', path=u'path')
         rset = self.execute('Any X,N ORDERBY N WITH X,N BEING '
-                            '((Any X,N WHERE X is EGroup, X name N)'
+                            '((Any X,N WHERE X is CWGroup, X name N)'
                             ' UNION '
                             ' (Any X,N WHERE X is Bookmark, X title N))')
         entity, rtype = rset.related_entity(0, 1)
         self.assertEquals(entity.eid, e.eid)
         self.assertEquals(rtype, 'title')
         entity, rtype = rset.related_entity(1, 1)
-        self.assertEquals(entity.id, 'EGroup')
+        self.assertEquals(entity.id, 'CWGroup')
         self.assertEquals(rtype, 'name')
         rset = self.execute('Any X,N ORDERBY N WHERE X is Bookmark WITH X,N BEING '
-                            '((Any X,N WHERE X is EGroup, X name N)'
+                            '((Any X,N WHERE X is CWGroup, X name N)'
                             ' UNION '
                             ' (Any X,N WHERE X is Bookmark, X title N))')
         entity, rtype = rset.related_entity(0, 1)
@@ -336,14 +336,14 @@
         # make sure we have at least one element
         self.failUnless(rset)
         self.assertEquals(set(e.e_schema.type for e in rset.entities(0)),
-                          set(['EUser',]))
+                          set(['CWUser',]))
         self.assertEquals(set(e.e_schema.type for e in rset.entities(1)),
-                          set(['EGroup',]))
+                          set(['CWGroup',]))
 
     def test_printable_rql(self):        
-        rset = self.execute(u'EEType X WHERE X final FALSE, X meta FALSE')
+        rset = self.execute(u'CWEType X WHERE X final FALSE, X meta FALSE')
         self.assertEquals(rset.printable_rql(),
-                          'Any X WHERE X final FALSE, X meta FALSE, X is EEType')
+                          'Any X WHERE X final FALSE, X meta FALSE, X is CWEType')
 
 
     def test_searched_text(self):
--- a/test/unittest_schema.py	Fri Apr 17 13:21:05 2009 +0200
+++ b/test/unittest_schema.py	Fri Apr 17 16:55:37 2009 +0200
@@ -141,9 +141,9 @@
         entities.sort()
         expected_entities = ['Bookmark', 'Boolean', 'Bytes', 'Card', 
                              'Date', 'Datetime', 'Decimal',
-                             'ECache', 'EConstraint', 'EConstraintType', 'EEType',
-                             'EFRDef', 'EGroup', 'EmailAddress', 'ENFRDef',
-                             'EPermission', 'EProperty', 'ERType', 'EUser',
+                             'CWCache', 'CWConstraint', 'CWConstraintType', 'CWEType',
+                             'CWAttribute', 'CWGroup', 'EmailAddress', 'CWRelation',
+                             'CWPermission', 'CWProperty', 'CWRType', 'CWUser',
                              'File', 'Float', 'Image', 'Int', 'Interval', 'Note',
                              'Password', 'Personne',
                              'RQLExpression', 
@@ -195,7 +195,7 @@
     
         self.assertListEquals(relations, expected_relations)
 
-        eschema = schema.eschema('EUser')
+        eschema = schema.eschema('CWUser')
         rels = sorted(str(r) for r in eschema.subject_relations())
         self.assertListEquals(rels, ['created_by', 'creation_date', 'eid',
                                      'evaluee', 'firstname', 'has_text', 'identity',
@@ -208,7 +208,7 @@
         self.assertListEquals(rels, ['bookmarked_by', 'created_by', 'for_user',
                                      'identity', 'owned_by', 'wf_info_for'])
         rschema = schema.rschema('relation_type')
-        properties = rschema.rproperties('EFRDef', 'ERType')
+        properties = rschema.rproperties('CWAttribute', 'CWRType')
         self.assertEquals(properties['cardinality'], '1*')
         constraints = properties['constraints']
         self.failUnlessEqual(len(constraints), 1, constraints)
@@ -218,7 +218,7 @@
 
     def test_fulltext_container(self):
         schema = loader.load(config)
-        self.failUnless('has_text' in schema['EUser'].subject_relations())
+        self.failUnless('has_text' in schema['CWUser'].subject_relations())
         self.failIf('has_text' in schema['EmailAddress'].subject_relations())
 
 
--- a/web/test/data/schema/relations.rel	Fri Apr 17 13:21:05 2009 +0200
+++ b/web/test/data/schema/relations.rel	Fri Apr 17 16:55:37 2009 +0200
@@ -1,2 +1,2 @@
 Personne travaille Societe
-EUser connait Personne
+CWUser connait Personne
--- a/web/test/data/schema/testschema.py	Fri Apr 17 13:21:05 2009 +0200
+++ b/web/test/data/schema/testschema.py	Fri Apr 17 16:55:37 2009 +0200
@@ -4,11 +4,11 @@
     
 class tags(RelationDefinition):
     subject = 'Tag'
-    object = ('BlogEntry', 'EUser')
+    object = ('BlogEntry', 'CWUser')
 
 class checked_by(RelationType):
     subject = 'BlogEntry'
-    object = 'EUser'
+    object = 'CWUser'
     cardinality = '?*'
     permissions = {
         'add': ('managers',),
--- a/web/test/test_views.py	Fri Apr 17 13:21:05 2009 +0200
+++ b/web/test/test_views.py	Fri Apr 17 16:55:37 2009 +0200
@@ -4,9 +4,9 @@
 from cubicweb.view import AnyRsetView
 
 AutomaticWebTest.application_rql = [
-    'Any L,F WHERE E is EUser, E login L, E firstname F',
-    'Any L,F,E WHERE E is EUser, E login L, E firstname F',
-    'Any COUNT(X) WHERE X is EUser',
+    'Any L,F WHERE E is CWUser, E login L, E firstname F',
+    'Any L,F,E WHERE E is CWUser, E login L, E firstname F',
+    'Any COUNT(X) WHERE X is CWUser',
     ]
 
 class ComposityCopy(WebTest):
@@ -15,7 +15,7 @@
         """regression test: make sure we can ask a copy of a
         composite entity
         """
-        rset = self.execute('EUser X WHERE X login "admin"')
+        rset = self.execute('CWUser X WHERE X login "admin"')
         self.view('copy', rset)
 
 
@@ -33,21 +33,21 @@
         self.auto_populate(10)
 
     def test_manual_tests(self):
-        rset = self.execute('Any P,F,S WHERE P is EUser, P firstname F, P surname S')
+        rset = self.execute('Any P,F,S WHERE P is CWUser, P firstname F, P surname S')
         self.view('table', rset, template=None, displayfilter=True, displaycols=[0,2])        
 
     def test_sortable_js_added(self):
-        rset = self.execute('EUser X')
+        rset = self.execute('CWUser X')
         # sortable.js should not be included by default
         self.failIf('jquery.tablesorter.js' in self.view('oneline', rset))
         # but should be included by the tableview
-        rset = self.execute('Any P,F,S LIMIT 1 WHERE P is EUser, P firstname F, P surname S')
+        rset = self.execute('Any P,F,S LIMIT 1 WHERE P is CWUser, P firstname F, P surname S')
         self.failUnless('jquery.tablesorter.js' in self.view('table', rset))
 
     def test_js_added_only_once(self):
         self.vreg._loadedmods[__name__] = {}
         self.vreg.register_vobject_class(SomeView)
-        rset = self.execute('EUser X')
+        rset = self.execute('CWUser X')
         source = self.view('someview', rset).source
         self.assertEquals(source.count('spam.js'), 1)
 
@@ -56,8 +56,8 @@
 class ExplicitViewsTest(WebTest):
     
     def test_unrelateddivs(self):
-        rset = self.execute('Any X WHERE X is EUser, X login "admin"')
-        group = self.add_entity('EGroup', name=u'R&D')
+        rset = self.execute('Any X WHERE X is CWUser, X login "admin"')
+        group = self.add_entity('CWGroup', name=u'R&D')
         req = self.request(relation='in_group_subject')
         self.view('unrelateddivs', rset, req)
         
--- a/web/test/unittest_application.py	Fri Apr 17 13:21:05 2009 +0200
+++ b/web/test/unittest_application.py	Fri Apr 17 16:55:37 2009 +0200
@@ -170,7 +170,7 @@
         self.commit()
     
     def test_nonregr_publish1(self):
-        req = self.request(u'EEType X WHERE X final FALSE, X meta FALSE')
+        req = self.request(u'CWEType X WHERE X final FALSE, X meta FALSE')
         self.app.publish('view', req)
         
     def test_nonregr_publish2(self):
@@ -183,7 +183,7 @@
         user = self.user()
         req.form = {
             'eid':       `user.eid`,
-            '__type:'+`user.eid`:    'EUser',
+            '__type:'+`user.eid`:    'CWUser',
             'login:'+`user.eid`:     '', # ERROR: no login specified
             'edits-login:'+`user.eid`: unicode(user.login),
              # just a sample, missing some necessary information for real life
@@ -207,7 +207,7 @@
         """        
         req = self.request()
         form = {'eid': ['X', 'Y'],
-                '__type:X': 'EUser',
+                '__type:X': 'CWUser',
                 # missing required field
                 'login:X': u'', 'edits-login:X': '', 
                 'surname:X': u'Mr Ouaoua', 'edits-surname:X': '',
@@ -253,7 +253,7 @@
         vreg = self.app.vreg
         # default value
         self.assertEquals(vreg.property_value('ui.language'), 'en')
-        self.execute('INSERT EProperty X: X value "fr", X pkey "ui.language"')
+        self.execute('INSERT CWProperty X: X value "fr", X pkey "ui.language"')
         self.assertEquals(vreg.property_value('ui.language'), 'en')
         self.commit()
         self.assertEquals(vreg.property_value('ui.language'), 'fr')
@@ -261,7 +261,7 @@
         self.assertEquals(vreg.property_value('ui.language'), 'fr')
         self.commit()
         self.assertEquals(vreg.property_value('ui.language'), 'de')
-        self.execute('DELETE EProperty X WHERE X pkey "ui.language"')
+        self.execute('DELETE CWProperty X WHERE X pkey "ui.language"')
         self.assertEquals(vreg.property_value('ui.language'), 'de')
         self.commit()
         self.assertEquals(vreg.property_value('ui.language'), 'en')
--- a/web/test/unittest_form.py	Fri Apr 17 13:21:05 2009 +0200
+++ b/web/test/unittest_form.py	Fri Apr 17 16:55:37 2009 +0200
@@ -14,7 +14,7 @@
     def test_form_field_format(self):
         form = FieldsForm(self.request(), None)
         self.assertEquals(form.form_field_format(None), 'text/html')
-        self.execute('INSERT EProperty X: X pkey "ui.default-text-format", X value "text/rest", X for_user U WHERE U login "admin"')
+        self.execute('INSERT CWProperty X: X pkey "ui.default-text-format", X value "text/rest", X for_user U WHERE U login "admin"')
         self.commit()
         self.assertEquals(form.form_field_format(None), 'text/rest')
 
@@ -43,7 +43,7 @@
         self.failIf(t.eid in unrelated, unrelated)
         
     def test_form_field_vocabulary_new_entity(self):
-        e = self.etype_instance('EUser')
+        e = self.etype_instance('CWUser')
         form = EntityFieldsForm(self.request(), None, entity=e)
         unrelated = [rview for rview, reid in form.subject_relation_vocabulary('in_group')]
         # should be default groups but owners, i.e. managers, users, guests
@@ -51,7 +51,7 @@
 
     def test_subject_in_state_vocabulary(self):
         # on a new entity
-        e = self.etype_instance('EUser')
+        e = self.etype_instance('CWUser')
         form = EntityFieldsForm(self.request(), None, entity=e)
         states = list(form.subject_in_state_vocabulary('in_state'))
         self.assertEquals(len(states), 1)
@@ -69,8 +69,8 @@
         
     def test_massmailing_formview(self):
         self.execute('INSERT EmailAddress X: X address L + "@cubicweb.org", '
-                     'U use_email X WHERE U is EUser, U login L')
-        rset = self.execute('EUser X')
+                     'U use_email X WHERE U is CWUser, U login L')
+        rset = self.execute('CWUser X')
         self.view('massmailing', rset, template=None)
         
 
--- a/web/test/unittest_formfields.py	Fri Apr 17 13:21:05 2009 +0200
+++ b/web/test/unittest_formfields.py	Fri Apr 17 16:55:37 2009 +0200
@@ -5,7 +5,7 @@
 from cubicweb.web.formwidgets import PasswordInput
 from cubicweb.web.formfields import *
 from cubicweb.entities.lib import Card
-from cubicweb.entities.authobjs import EUser
+from cubicweb.entities.authobjs import CWUser
 from cubes.file.entities import File
 
 config = TestServerConfiguration('data')
@@ -13,8 +13,8 @@
 schema = config.load_schema()
 Card.schema = schema
 Card.__initialize__()
-EUser.schema = schema
-EUser.__initialize__()
+CWUser.schema = schema
+CWUser.__initialize__()
 File.schema = schema
 File.__initialize__()
         
@@ -49,22 +49,22 @@
 
         
     def test_euser_fields(self):
-        upassword_field = guess_field(EUser, schema['upassword'])
+        upassword_field = guess_field(CWUser, schema['upassword'])
         self.assertIsInstance(upassword_field, StringField)
         self.assertIsInstance(upassword_field.widget, PasswordInput)
         self.assertEquals(upassword_field.required, True)
 
-        last_login_time_field = guess_field(EUser, schema['last_login_time'])
+        last_login_time_field = guess_field(CWUser, schema['last_login_time'])
         self.assertIsInstance(last_login_time_field, DateTimeField)
         self.assertEquals(last_login_time_field.required, False)
 
-        in_group_field = guess_field(EUser, schema['in_group'])
+        in_group_field = guess_field(CWUser, schema['in_group'])
         self.assertIsInstance(in_group_field, RelationField)
         self.assertEquals(in_group_field.required, True)
         self.assertEquals(in_group_field.role, 'subject')
         self.assertEquals(in_group_field.help, 'groups grant permissions to the user')
 
-        owned_by_field = guess_field(EUser, schema['owned_by'], 'object')
+        owned_by_field = guess_field(CWUser, schema['owned_by'], 'object')
         self.assertIsInstance(owned_by_field, RelationField)
         self.assertEquals(owned_by_field.required, False)
         self.assertEquals(owned_by_field.role, 'object')
--- a/web/test/unittest_magicsearch.py	Fri Apr 17 13:21:05 2009 +0200
+++ b/web/test/unittest_magicsearch.py	Fri Apr 17 16:55:37 2009 +0200
@@ -11,7 +11,7 @@
 
 
 translations = {
-    u'EUser' : u"Utilisateur",
+    u'CWUser' : u"Utilisateur",
 #    u'Workcase' : u"Affaire",
     u'EmailAddress' : u"Adresse",
 #    u'Division' : u"Division",
@@ -54,7 +54,7 @@
         self.assertEquals(rql, "Any P WHERE P use_email C, C is EmailAddress, C alias 'Logilab'")
         rql = "Any P WHERE P is Utilisateur, P adel C, P nom 'Smith'"
         rql, = self.proc.preprocess_query(rql, self.req)
-        self.assertEquals(rql, "Any P WHERE P is EUser, P use_email C, P surname 'Smith'")
+        self.assertEquals(rql, "Any P WHERE P is CWUser, P use_email C, P surname 'Smith'")
 
 
 class QSPreProcessorTC(EnvBasedTC):
@@ -79,7 +79,7 @@
     def test_attribute_translation(self):
         """tests QSPreProcessor._get_attribute_name"""
         translate = self.proc._get_attribute_name
-        eschema = self.schema.eschema('EUser')
+        eschema = self.schema.eschema('CWUser')
         self.assertEquals(translate(u'prénom', eschema), "firstname")
         self.assertEquals(translate(u'nom', eschema), 'surname')
         #self.assert_(translate(u'nom') in ('name', 'surname'))
@@ -95,10 +95,10 @@
         transform = self.proc._one_word_query
         self.assertEquals(transform('123'),
                           ('Any X WHERE X eid %(x)s', {'x': 123}, 'x'))
-        self.assertEquals(transform('EUser'),
-                          ('EUser E',))
+        self.assertEquals(transform('CWUser'),
+                          ('CWUser E',))
         self.assertEquals(transform('Utilisateur'),
-                          ('EUser E',))
+                          ('CWUser E',))
         self.assertEquals(transform('Adresse'),
                           ('EmailAddress E',))
         self.assertEquals(transform('adresse'),
@@ -108,37 +108,37 @@
     def test_two_words_query(self):
         """tests the 'two words shortcut queries'"""
         transform = self.proc._two_words_query
-        self.assertEquals(transform('EUser', 'E'),
-                          ("EUser E",))
-        self.assertEquals(transform('EUser', 'Smith'),
-                          ('EUser E WHERE E has_text %(text)s', {'text': 'Smith'}))
+        self.assertEquals(transform('CWUser', 'E'),
+                          ("CWUser E",))
+        self.assertEquals(transform('CWUser', 'Smith'),
+                          ('CWUser E WHERE E has_text %(text)s', {'text': 'Smith'}))
         self.assertEquals(transform('utilisateur', 'Smith'),
-                          ('EUser E WHERE E has_text %(text)s', {'text': 'Smith'}))
+                          ('CWUser E WHERE E has_text %(text)s', {'text': 'Smith'}))
         self.assertEquals(transform(u'adresse', 'Logilab'),
                           ('EmailAddress E WHERE E has_text %(text)s', {'text': 'Logilab'}))
         self.assertEquals(transform(u'adresse', 'Logi%'),
                           ('EmailAddress E WHERE E alias LIKE %(text)s', {'text': 'Logi%'}))
         self.assertRaises(BadRQLQuery, transform, "pers", "taratata")
-        #self.assertEquals(transform('EUser', '%mi'), 'EUser E WHERE P surname LIKE "%mi"')
+        #self.assertEquals(transform('CWUser', '%mi'), 'CWUser E WHERE P surname LIKE "%mi"')
 
     def test_three_words_query(self):
         """tests the 'three words shortcut queries'"""
         transform = self.proc._three_words_query
         self.assertEquals(transform('utilisateur', u'prénom', 'cubicweb'),
-                          ('EUser E WHERE E firstname %(text)s', {'text': 'cubicweb'}))
+                          ('CWUser E WHERE E firstname %(text)s', {'text': 'cubicweb'}))
         self.assertEquals(transform('utilisateur', 'nom', 'cubicweb'),
-                          ('EUser E WHERE E surname %(text)s', {'text': 'cubicweb'}))
+                          ('CWUser E WHERE E surname %(text)s', {'text': 'cubicweb'}))
         self.assertEquals(transform(u'adresse', 'nom', 'cubicweb'),
                           ('EmailAddress E WHERE E alias %(text)s', {'text': 'cubicweb'}))
         self.assertEquals(transform('EmailAddress', 'nom', 'cubicweb'),
                           ('EmailAddress E WHERE E alias %(text)s', {'text': 'cubicweb'})) 
         self.assertEquals(transform('utilisateur', u'prénom', 'cubicweb%'),
-                          ('EUser E WHERE E firstname LIKE %(text)s', {'text': 'cubicweb%'}))
+                          ('CWUser E WHERE E firstname LIKE %(text)s', {'text': 'cubicweb%'}))
         # expanded shortcuts
-        self.assertEquals(transform('EUser', 'use_email', 'Logilab'),
-                          ('EUser E WHERE E use_email E1, E1 has_text %(text)s', {'text': 'Logilab'}))
-        self.assertEquals(transform('EUser', 'use_email', '%Logilab'),
-                          ('EUser E WHERE E use_email E1, E1 alias LIKE %(text)s', {'text': '%Logilab'}))
+        self.assertEquals(transform('CWUser', 'use_email', 'Logilab'),
+                          ('CWUser E WHERE E use_email E1, E1 has_text %(text)s', {'text': 'Logilab'}))
+        self.assertEquals(transform('CWUser', 'use_email', '%Logilab'),
+                          ('CWUser E WHERE E use_email E1, E1 alias LIKE %(text)s', {'text': '%Logilab'}))
         self.assertRaises(BadRQLQuery, transform, 'word1', 'word2', 'word3')
         
     def test_multiple_words_query(self):
@@ -150,24 +150,24 @@
         """tests how quoted queries are handled"""
         queries = [
             (u'Adresse "My own EmailAddress"', ('EmailAddress E WHERE E has_text %(text)s', {'text': u'My own EmailAddress'})),
-            (u'Utilisateur prénom "Jean Paul"', ('EUser E WHERE E firstname %(text)s', {'text': 'Jean Paul'})),
-            (u'Utilisateur firstname "Jean Paul"', ('EUser E WHERE E firstname %(text)s', {'text': 'Jean Paul'})),
-            (u'EUser firstname "Jean Paul"', ('EUser E WHERE E firstname %(text)s', {'text': 'Jean Paul'})),
+            (u'Utilisateur prénom "Jean Paul"', ('CWUser E WHERE E firstname %(text)s', {'text': 'Jean Paul'})),
+            (u'Utilisateur firstname "Jean Paul"', ('CWUser E WHERE E firstname %(text)s', {'text': 'Jean Paul'})),
+            (u'CWUser firstname "Jean Paul"', ('CWUser E WHERE E firstname %(text)s', {'text': 'Jean Paul'})),
             ]
         transform = self.proc._quoted_words_query
         for query, expected in queries:
             self.assertEquals(transform(query), expected)
         self.assertRaises(BadRQLQuery, transform, "unquoted rql")
         self.assertRaises(BadRQLQuery, transform, 'pers "Jean Paul"')
-        self.assertRaises(BadRQLQuery, transform, 'EUser firstname other "Jean Paul"')
+        self.assertRaises(BadRQLQuery, transform, 'CWUser firstname other "Jean Paul"')
     
     def test_process_query(self):
         """tests how queries are processed"""
         queries = [
-            (u'Utilisateur', (u"EUser E",)),
-            (u'Utilisateur P', (u"EUser P",)),
-            (u'Utilisateur cubicweb', (u'EUser E WHERE E has_text %(text)s', {'text': u'cubicweb'})),
-            (u'EUser prénom cubicweb', (u'EUser E WHERE E firstname %(text)s', {'text': 'cubicweb'},)),
+            (u'Utilisateur', (u"CWUser E",)),
+            (u'Utilisateur P', (u"CWUser P",)),
+            (u'Utilisateur cubicweb', (u'CWUser E WHERE E has_text %(text)s', {'text': u'cubicweb'})),
+            (u'CWUser prénom cubicweb', (u'CWUser E WHERE E firstname %(text)s', {'text': 'cubicweb'},)),
             (u'Any X WHERE X is Something', (u"Any X WHERE X is Something",)),
             ]
         for query, expected in queries:
@@ -195,11 +195,11 @@
             # XXX this sounds like a language translator test...
             # and it fail
             (u'Utilisateur Smith',
-             ('EUser E WHERE E has_text %(text)s', {'text': u'Smith'})),
+             ('CWUser E WHERE E has_text %(text)s', {'text': u'Smith'})),
             (u'utilisateur nom Smith',
-             ('EUser E WHERE E surname %(text)s', {'text': u'Smith'})),
+             ('CWUser E WHERE E surname %(text)s', {'text': u'Smith'})),
             (u'Any P WHERE P is Utilisateur, P nom "Smith"',
-             ('Any P WHERE P is EUser, P surname "Smith"', None)),
+             ('Any P WHERE P is CWUser, P surname "Smith"', None)),
             ]
         for query, expected in queries:
             rset = self.proc.process_query(query, self.req)
@@ -213,9 +213,9 @@
 
     def test_explicit_component(self):
         self.assertRaises(RQLSyntaxError,
-                          self.proc.process_query, u'rql: EUser E WHERE E noattr "Smith",', self.req)
+                          self.proc.process_query, u'rql: CWUser E WHERE E noattr "Smith",', self.req)
         self.assertRaises(BadRQLQuery,
-                          self.proc.process_query, u'rql: EUser E WHERE E noattr "Smith"', self.req)
+                          self.proc.process_query, u'rql: CWUser E WHERE E noattr "Smith"', self.req)
         rset = self.proc.process_query(u'text: utilisateur Smith', self.req)
         self.assertEquals(rset.rql, 'Any X WHERE X has_text %(text)s')
         self.assertEquals(rset.args, {'text': u'utilisateur Smith'})
--- a/web/test/unittest_urlpublisher.py	Fri Apr 17 13:21:05 2009 +0200
+++ b/web/test/unittest_urlpublisher.py	Fri Apr 17 16:55:37 2009 +0200
@@ -41,32 +41,32 @@
 
     def test_rest_path(self):
         """tests the rest path resolution"""
-        ctrl, rset = self.process('EUser')
+        ctrl, rset = self.process('CWUser')
         self.assertEquals(ctrl, 'view')
-        self.assertEquals(rset.description[0][0], 'EUser')
+        self.assertEquals(rset.description[0][0], 'CWUser')
         self.assertEquals(rset.printable_rql(),
-                          "Any X,AA,AB,AC,AD ORDERBY AA WHERE X is EUser, X login AA, X firstname AB, X surname AC, X modification_date AD")
-        ctrl, rset = self.process('EUser/login/admin')
+                          "Any X,AA,AB,AC,AD ORDERBY AA WHERE X is CWUser, X login AA, X firstname AB, X surname AC, X modification_date AD")
+        ctrl, rset = self.process('CWUser/login/admin')
         self.assertEquals(ctrl, 'view')
         self.assertEquals(len(rset), 1)
-        self.assertEquals(rset.description[0][0], 'EUser')
-        self.assertEquals(rset.printable_rql(), 'Any X WHERE X is EUser, X login "admin"')
+        self.assertEquals(rset.description[0][0], 'CWUser')
+        self.assertEquals(rset.printable_rql(), 'Any X WHERE X is CWUser, X login "admin"')
         ctrl, rset = self.process('euser/admin')
         self.assertEquals(ctrl, 'view')
         self.assertEquals(len(rset), 1)
-        self.assertEquals(rset.description[0][0], 'EUser')
-        self.assertEquals(rset.printable_rql(), 'Any X WHERE X is EUser, X login "admin"')
+        self.assertEquals(rset.description[0][0], 'CWUser')
+        self.assertEquals(rset.printable_rql(), 'Any X WHERE X is CWUser, X login "admin"')
         ctrl, rset = self.process('euser/eid/%s'%rset[0][0])
         self.assertEquals(ctrl, 'view')
         self.assertEquals(len(rset), 1)
-        self.assertEquals(rset.description[0][0], 'EUser')
-        self.assertEquals(rset.printable_rql(), 'Any X WHERE X is EUser, X eid 5')
+        self.assertEquals(rset.description[0][0], 'CWUser')
+        self.assertEquals(rset.printable_rql(), 'Any X WHERE X is CWUser, X eid 5')
         # test non-ascii paths
-        ctrl, rset = self.process('EUser/login/%C3%BFsa%C3%BFe')
+        ctrl, rset = self.process('CWUser/login/%C3%BFsa%C3%BFe')
         self.assertEquals(ctrl, 'view')
         self.assertEquals(len(rset), 1)
-        self.assertEquals(rset.description[0][0], 'EUser')
-        self.assertEquals(rset.printable_rql(), u'Any X WHERE X is EUser, X login "ÿsaÿe"')
+        self.assertEquals(rset.description[0][0], 'CWUser')
+        self.assertEquals(rset.printable_rql(), u'Any X WHERE X is CWUser, X login "ÿsaÿe"')
         # test quoted paths
         ctrl, rset = self.process('BlogEntry/title/hell%27o')
         self.assertEquals(ctrl, 'view')
@@ -74,9 +74,9 @@
         self.assertEquals(rset.description[0][0], 'BlogEntry')
         self.assertEquals(rset.printable_rql(), u'Any X WHERE X is BlogEntry, X title "hell\'o"')
         # errors
-        self.assertRaises(NotFound, self.process, 'EUser/eid/30000')
+        self.assertRaises(NotFound, self.process, 'CWUser/eid/30000')
         self.assertRaises(NotFound, self.process, 'Workcases')
-        self.assertRaises(NotFound, self.process, 'EUser/inexistant_attribute/joe')
+        self.assertRaises(NotFound, self.process, 'CWUser/inexistant_attribute/joe')
     
     def test_action_path(self):
         """tests the action path resolution"""
@@ -85,7 +85,7 @@
         self.assertRaises(Redirect, self.process, 'Tag/yo/edit')
         self.assertRaises(NotFound, self.process, 'view/edit')
         self.assertRaises(NotFound, self.process, '1/non_action')
-        self.assertRaises(NotFound, self.process, 'EUser/login/admin/non_action')
+        self.assertRaises(NotFound, self.process, 'CWUser/login/admin/non_action')
 
 
     def test_regexp_path(self):
--- a/web/test/unittest_urlrewrite.py	Fri Apr 17 13:21:05 2009 +0200
+++ b/web/test/unittest_urlrewrite.py	Fri Apr 17 16:55:37 2009 +0200
@@ -28,7 +28,7 @@
             ('/manage', dict(vid='manage')),
             ('/notfound', {'vid': '404'}),
             ('/error', {'vid': 'error'}),
-            ('/schema/([^/]+?)/?$', {'rql': r'Any X WHERE X is EEType, X name "\1"', 'vid': 'eschema'}),
+            ('/schema/([^/]+?)/?$', {'rql': r'Any X WHERE X is CWEType, X name "\1"', 'vid': 'eschema'}),
             ('/add/([^/]+?)/?$' , dict(vid='creation', etype=r'\1')),
             ('/doc/images/(.+?)/?$', dict(fid='\\1', vid='wdocimages')),
             ('/doc/?$', dict(fid='main', vid='wdoc')),
--- a/web/test/unittest_views_actions.py	Fri Apr 17 13:21:05 2009 +0200
+++ b/web/test/unittest_views_actions.py	Fri Apr 17 16:55:37 2009 +0200
@@ -4,11 +4,11 @@
 
 class ActionsTC(EnvBasedTC):
     def test_view_action(self):
-        req = self.request(__message='bla bla bla', vid='rss', rql='EUser X')
-        rset = self.execute('EUser X')
+        req = self.request(__message='bla bla bla', vid='rss', rql='CWUser X')
+        rset = self.execute('CWUser X')
         vaction = [action for action in self.vreg.possible_vobjects('actions', req, rset)
                    if action.id == 'view'][0]
-        self.assertEquals(vaction.url(), 'http://testing.fr/cubicweb/view?rql=EUser%20X')
+        self.assertEquals(vaction.url(), 'http://testing.fr/cubicweb/view?rql=CWUser%20X')
 
     def test_sendmail_action(self):
         req = self.request()
--- a/web/test/unittest_views_basecontrollers.py	Fri Apr 17 13:21:05 2009 +0200
+++ b/web/test/unittest_views_basecontrollers.py	Fri Apr 17 16:55:37 2009 +0200
@@ -13,17 +13,17 @@
 from cubicweb.web import INTERNAL_FIELD_VALUE, Redirect, RequestError
 from cubicweb.web.views.basecontrollers import xmlize
 
-from cubicweb.entities.authobjs import EUser
+from cubicweb.entities.authobjs import CWUser
 
 
 class EditControllerTC(ControllerTC):
     def setUp(self):
         ControllerTC.setUp(self)
-        self.failUnless('users' in self.schema.eschema('EGroup').get_groups('read'))
+        self.failUnless('users' in self.schema.eschema('CWGroup').get_groups('read'))
         
     def tearDown(self):
         ControllerTC.tearDown(self)
-        self.failUnless('users' in self.schema.eschema('EGroup').get_groups('read'))
+        self.failUnless('users' in self.schema.eschema('CWGroup').get_groups('read'))
         
     def test_noparam_edit(self):
         """check behaviour of this controller without any form parameter
@@ -36,7 +36,7 @@
         """test creation of two linked entities
         """        
         user = self.user()
-        self.req.form = {'eid': 'X', '__type:X': 'EUser',
+        self.req.form = {'eid': 'X', '__type:X': 'CWUser',
                          'login:X': u'admin', 'edits-login:X': u'', 
                          'upassword:X': u'toto', 'upassword-confirm:X': u'toto', 'edits-upassword:X': u'', 
                          }
@@ -47,13 +47,13 @@
         """checking that a manager user can edit itself
         """
         user = self.user()
-        basegroups = [str(eid) for eid, in self.execute('EGroup G WHERE X in_group G, X eid %(x)s', {'x': user.eid})]
-        groupeids = [eid for eid, in self.execute('EGroup G WHERE G name in ("managers", "users")')]
+        basegroups = [str(eid) for eid, in self.execute('CWGroup G WHERE X in_group G, X eid %(x)s', {'x': user.eid})]
+        groupeids = [eid for eid, in self.execute('CWGroup G WHERE G name in ("managers", "users")')]
         groups = [str(eid) for eid in groupeids]
         stateeid = [eid for eid, in self.execute('State S WHERE S name "activated"')][0]
         self.req.form = {
             'eid':       `user.eid`,
-            '__type:'+`user.eid`:    'EUser',
+            '__type:'+`user.eid`:    'CWUser',
             'login:'+`user.eid`:     unicode(user.login),
             'firstname:'+`user.eid`: u'Th\xe9nault',
             'surname:'+`user.eid`:   u'Sylvain',
@@ -78,10 +78,10 @@
         user = self.create_user('user')
         cnx = self.login('user')
         req = self.request()
-        #self.assertEquals(self.ctrl.schema['EUser']._groups['read'],
+        #self.assertEquals(self.ctrl.schema['CWUser']._groups['read'],
         #                  ('managers', 'users'))
         req.form = {
-            'eid': `user.eid`, '__type:'+`user.eid`: 'EUser',
+            'eid': `user.eid`, '__type:'+`user.eid`: 'CWUser',
             '__maineid' : str(user.eid),
             'upassword:'+`user.eid`: 'tournicoton',
             'upassword-confirm:'+`user.eid`: 'tournicoton',
@@ -97,10 +97,10 @@
         relations (meaning no changes)
         """
         user = self.user()
-        groupeids = [eid for eid, in self.execute('EGroup G WHERE X in_group G, X eid %(x)s', {'x': user.eid})]
+        groupeids = [eid for eid, in self.execute('CWGroup G WHERE X in_group G, X eid %(x)s', {'x': user.eid})]
         self.req.form = {
             'eid':       `user.eid`,
-            '__type:'+`user.eid`:    'EUser',
+            '__type:'+`user.eid`:    'CWUser',
             'login:'+`user.eid`:     unicode(user.login),
             'firstname:'+`user.eid`: u'Th\xe9nault',
             'surname:'+`user.eid`:   u'Sylvain',
@@ -120,10 +120,10 @@
         
         
     def test_create_multiple_linked(self):
-        gueid = self.execute('EGroup G WHERE G name "users"')[0][0]
+        gueid = self.execute('CWGroup G WHERE G name "users"')[0][0]
         self.req.form = {'eid': ['X', 'Y'],
                          
-                         '__type:X': 'EUser',
+                         '__type:X': 'CWUser',
                          '__maineid' : 'X',
                          'login:X': u'adim', 'edits-login:X': u'', 
                          'upassword:X': u'toto', 'upassword-confirm:X': u'toto', 'edits-upassword:X': u'', 
@@ -146,7 +146,7 @@
     def test_edit_multiple_linked(self):
         peid = self.create_user('adim').eid
         self.req.form = {'eid': [`peid`, 'Y'],
-                         '__type:%s'%peid: 'EUser',
+                         '__type:%s'%peid: 'CWUser',
                          'surname:%s'%peid: u'Di Masci', 'edits-surname:%s'%peid: '',
                          
                          '__type:Y': 'EmailAddress',
@@ -165,7 +165,7 @@
         
         emaileid = email.eid
         self.req.form = {'eid': [`peid`, `emaileid`],
-                         '__type:%s'%peid: 'EUser',
+                         '__type:%s'%peid: 'CWUser',
                          'surname:%s'%peid: u'Di Masci', 'edits-surname:%s'%peid: 'Di Masci',
                          '__type:%s'%emaileid: 'EmailAddress',
                          'address:%s'%emaileid: u'adim@logilab.fr', 'edits-address:%s'%emaileid: 'dima@logilab.fr',
@@ -186,13 +186,13 @@
         """        
         user = self.user()
         self.req.form = {'__cloned_eid:X': user.eid,
-                         'eid': 'X', '__type:X': 'EUser',
+                         'eid': 'X', '__type:X': 'CWUser',
                          'login:X': u'toto', 'edits-login:X': u'', 
                          'upassword:X': u'toto', 'edits-upassword:X': u'', 
                          }
         self.assertRaises(ValidationError, self.publish, self.req)
         self.req.form = {'__cloned_eid:X': user.eid,
-                         'eid': 'X', '__type:X': 'EUser',
+                         'eid': 'X', '__type:X': 'CWUser',
                          'login:X': u'toto', 'edits-login:X': u'', 
                          'upassword:X': u'toto', 'upassword-confirm:X': u'tutu', 'edits-upassword:X': u'', 
                          }
@@ -227,7 +227,7 @@
 
     def test_req_pending_insert(self):
         """make sure req's pending insertions are taken into account"""
-        tmpgroup = self.add_entity('EGroup', name=u"test")
+        tmpgroup = self.add_entity('CWGroup', name=u"test")
         user = self.user()
         self.req.set_session_data('pending_insert', set([(user.eid, 'in_group', tmpgroup.eid)]))
         path, params = self.expect_redirect_publish()
@@ -240,7 +240,7 @@
     def test_req_pending_delete(self):
         """make sure req's pending deletions are taken into account"""
         user = self.user()
-        groupeid = self.execute('INSERT EGroup G: G name "test", U in_group G WHERE U eid %(x)s',
+        groupeid = self.execute('INSERT CWGroup G: G name "test", U in_group G WHERE U eid %(x)s',
                                 {'x': user.eid})[0][0]
         usergroups = [gname for gname, in
                       self.execute('Any N WHERE G name N, U in_group G, U eid %(u)s', {'u': user.eid})]
@@ -258,13 +258,13 @@
         def custom_login_edit(self, formparams, value, relations):
             formparams['login'] = value.upper()
             relations.append('X login %(login)s')
-        EUser.custom_login_edit = custom_login_edit
+        CWUser.custom_login_edit = custom_login_edit
         try:
             user = self.user()
             eid = repr(user.eid)
             self.req.form = {
                 'eid': eid,
-                '__type:'+eid:  'EUser',
+                '__type:'+eid:  'CWUser',
                 'login:'+eid: u'foo',
                 'edits-login:'+eid:  unicode(user.login),
                 }
@@ -272,7 +272,7 @@
             rset = self.execute('Any L WHERE X eid %(x)s, X login L', {'x': user.eid}, 'x')
             self.assertEquals(rset[0][0], 'FOO')
         finally:
-            del EUser.custom_login_edit
+            del CWUser.custom_login_edit
         
     def test_redirect_apply_button(self):
         redirectrql = rql_for_eid(4012) # whatever
@@ -342,22 +342,22 @@
         self.assertEquals(params, {u'__message': u'entities deleted'})
 
     def test_nonregr_egroup_etype_editing(self):
-        """non-regression test checking that a manager user can edit a EEType entity (EGroup)
+        """non-regression test checking that a manager user can edit a CWEType entity (CWGroup)
         """
-        groupeids = [eid for eid, in self.execute('EGroup G WHERE G name "managers"')]
+        groupeids = [eid for eid, in self.execute('CWGroup G WHERE G name "managers"')]
         groups = [str(eid) for eid in groupeids]
-        eeetypeeid = self.execute('EEType X WHERE X name "EGroup"')[0][0]
-        basegroups = [str(eid) for eid, in self.execute('EGroup G WHERE X read_permission G, X eid %(x)s', {'x': eeetypeeid})]
+        eeetypeeid = self.execute('CWEType X WHERE X name "CWGroup"')[0][0]
+        basegroups = [str(eid) for eid, in self.execute('CWGroup G WHERE X read_permission G, X eid %(x)s', {'x': eeetypeeid})]
         self.req.form = {
                 'eid':      `eeetypeeid`,
-                '__type:'+`eeetypeeid`:   'EEType',
-                'name:'+`eeetypeeid`:     u'EGroup',
+                '__type:'+`eeetypeeid`:   'CWEType',
+                'name:'+`eeetypeeid`:     u'CWGroup',
                 'final:'+`eeetypeeid`:    False,
                 'meta:'+`eeetypeeid`:     True,
                 'description:'+`eeetypeeid`:     u'users group', 
                 'read_permission:'+`eeetypeeid`:  groups,
                 #
-                'edits-name:'+`eeetypeeid`:     u'EGroup',
+                'edits-name:'+`eeetypeeid`:     u'CWGroup',
                 'edits-final:'+`eeetypeeid`:    False,
                 'edits-meta:'+`eeetypeeid`:     True,
                 'edits-description:'+`eeetypeeid`:     u'users group', 
@@ -366,30 +366,30 @@
         try:
             path, params = self.expect_redirect_publish()
             e = self.execute('Any X WHERE X eid %(x)s', {'x': eeetypeeid}, 'x').get_entity(0, 0)
-            self.assertEquals(e.name, 'EGroup')
+            self.assertEquals(e.name, 'CWGroup')
             self.assertEquals([g.eid for g in e.read_permission], groupeids)
         finally:
             # restore
-            self.execute('SET X read_permission Y WHERE X name "EGroup", Y eid IN (%s), NOT X read_permission Y' % (','.join(basegroups)))
+            self.execute('SET X read_permission Y WHERE X name "CWGroup", Y eid IN (%s), NOT X read_permission Y' % (','.join(basegroups)))
             self.commit()
             
     def test_nonregr_eetype_etype_editing(self):
-        """non-regression test checking that a manager user can edit a EEType entity (EEType)
+        """non-regression test checking that a manager user can edit a CWEType entity (CWEType)
         """
-        groupeids = sorted(eid for eid, in self.execute('EGroup G WHERE G name in ("managers", "users")'))
+        groupeids = sorted(eid for eid, in self.execute('CWGroup G WHERE G name in ("managers", "users")'))
         groups = [str(eid) for eid in groupeids]
-        eeetypeeid = self.execute('EEType X WHERE X name "EEType"')[0][0]
-        basegroups = [str(eid) for eid, in self.execute('EGroup G WHERE X read_permission G, X eid %(x)s', {'x': eeetypeeid})]
+        eeetypeeid = self.execute('CWEType X WHERE X name "CWEType"')[0][0]
+        basegroups = [str(eid) for eid, in self.execute('CWGroup G WHERE X read_permission G, X eid %(x)s', {'x': eeetypeeid})]
         self.req.form = {
                 'eid':      `eeetypeeid`,
-                '__type:'+`eeetypeeid`:  'EEType',
-                'name:'+`eeetypeeid`:     u'EEType',
+                '__type:'+`eeetypeeid`:  'CWEType',
+                'name:'+`eeetypeeid`:     u'CWEType',
                 'final:'+`eeetypeeid`:    False,
                 'meta:'+`eeetypeeid`:     True,
                 'description:'+`eeetypeeid`:     u'users group', 
                 'read_permission:'+`eeetypeeid`:  groups,
 
-                'edits-name:'+`eeetypeeid`:     u'EEType',
+                'edits-name:'+`eeetypeeid`:     u'CWEType',
                 'edits-final:'+`eeetypeeid`:    False,
                 'edits-meta:'+`eeetypeeid`:     True,
                 'edits-description:'+`eeetypeeid`:     u'users group', 
@@ -398,11 +398,11 @@
         try:
             path, params = self.expect_redirect_publish()
             e = self.execute('Any X WHERE X eid %(x)s', {'x': eeetypeeid}, 'x').get_entity(0, 0)
-            self.assertEquals(e.name, 'EEType')
+            self.assertEquals(e.name, 'CWEType')
             self.assertEquals(sorted(g.eid for g in e.read_permission), groupeids)
         finally:
             # restore
-            self.execute('SET X read_permission Y WHERE X name "EEType", Y eid IN (%s), NOT X read_permission Y' % (','.join(basegroups)))
+            self.execute('SET X read_permission Y WHERE X name "CWEType", Y eid IN (%s), NOT X read_permission Y' % (','.join(basegroups)))
             self.commit()
         
     def test_nonregr_strange_text_input(self):
@@ -424,10 +424,10 @@
 
 
     def test_nonregr_multiple_empty_email_addr(self):
-        gueid = self.execute('EGroup G WHERE G name "users"')[0][0]
+        gueid = self.execute('CWGroup G WHERE G name "users"')[0][0]
         self.req.form = {'eid': ['X', 'Y'],
                          
-                         '__type:X': 'EUser',
+                         '__type:X': 'CWUser',
                          'login:X': u'adim', 'edits-login:X': u'', 
                          'upassword:X': u'toto', 'upassword-confirm:X': u'toto', 'edits-upassword:X': u'', 
                          'in_group:X': `gueid`, 'edits-in_group:X': INTERNAL_FIELD_VALUE, 
@@ -442,14 +442,14 @@
     def test_nonregr_copy(self):
         user = self.user()
         self.req.form = {'__cloned_eid:X': user.eid,
-                         'eid': 'X', '__type:X': 'EUser',
+                         'eid': 'X', '__type:X': 'CWUser',
                          '__maineid' : 'X',
                          'login:X': u'toto', 'edits-login:X': u'', 
                          'upassword:X': u'toto', 'upassword-confirm:X': u'toto', 'edits-upassword:X': u'', 
                          }
         path, params = self.expect_redirect_publish()
         self.assertEquals(path, 'euser/toto')
-        e = self.execute('Any X WHERE X is EUser, X login "toto"').get_entity(0, 0)
+        e = self.execute('Any X WHERE X is CWUser, X login "toto"').get_entity(0, 0)
         self.assertEquals(e.login, 'toto')
         self.assertEquals(e.in_group[0].name, 'managers')
 
@@ -464,7 +464,7 @@
             self.execute('SET P use_email E, P primary_email E WHERE P eid %(p)s, E eid %(e)s',
                          {'p' : p.eid, 'e' : e.eid})
             self.req.form = {'__cloned_eid:X': p.eid,
-                             'eid': 'X', '__type:X': 'EUser',
+                             'eid': 'X', '__type:X': 'CWUser',
                              'login': u'dodo', 'edits-login': u'dodo', 
                              'surname:X': u'Boom', 'edits-surname:X': u'',
                              '__errorurl' : "whatever but required",
@@ -479,7 +479,7 @@
                 self.req.form['rql'] = 'Any X WHERE X eid %s' % p.eid
                 self.req.form['vid'] = 'copy'
                 self.env.app.publish('view', self.req)
-            rset = self.execute('EUser P WHERE P surname "Boom"')
+            rset = self.execute('CWUser P WHERE P surname "Boom"')
             self.assertEquals(len(rset), 0)
         finally:
             p.__class__.skip_copy_for = old_skips
@@ -527,7 +527,7 @@
 
     ## tests ##################################################################
     def test_simple_exec(self):
-        ctrl = self.ctrl(self.request(rql='EUser P WHERE P login "John"',
+        ctrl = self.ctrl(self.request(rql='CWUser P WHERE P login "John"',
                                       pageid='123'))
         self.assertTextEquals(ctrl.publish(),
                               xmlize(self.john.view('primary')))
@@ -542,26 +542,26 @@
         self.remote_call('tag_entity', self.john.eid, ['python'])
         self.assertUnorderedIterableEquals([tname for tname, in self.execute('Any N WHERE T is Tag, T name N')],
                              ['python', 'cubicweb'])
-        self.assertEquals(self.execute('Any N WHERE T tags P, P is EUser, T name N').rows,
+        self.assertEquals(self.execute('Any N WHERE T tags P, P is CWUser, T name N').rows,
                           [['python']])
     
     def test_remote_add_new_tag(self):
         self.remote_call('tag_entity', self.john.eid, ['javascript'])
         self.assertUnorderedIterableEquals([tname for tname, in self.execute('Any N WHERE T is Tag, T name N')],
                              ['python', 'cubicweb', 'javascript'])
-        self.assertEquals(self.execute('Any N WHERE T tags P, P is EUser, T name N').rows,
+        self.assertEquals(self.execute('Any N WHERE T tags P, P is CWUser, T name N').rows,
                           [['javascript']])
 
     def test_edit_field(self):
-        nbusers = len(self.execute('EUser P'))
+        nbusers = len(self.execute('CWUser P'))
         eid = self.john.eid
         self.remote_call('edit_field', 'apply',
                          ('eid', 'firstname:%s' % eid, '__maineid', '__type:%s'% eid, 'edits-firstname:%s' % eid ),
-                         (str(eid), u'Remi', str(eid), 'EUser', self.john.firstname),
+                         (str(eid), u'Remi', str(eid), 'CWUser', self.john.firstname),
                          'firstname',
                          eid)
         self.commit()
-        rset = self.execute('EUser P')
+        rset = self.execute('CWUser P')
         # make sure we did not insert a new euser here
         self.assertEquals(len(rset), nbusers)
         john = self.execute('Any X WHERE X eid %(x)s', {'x': self.john.eid}, 'x').get_entity(0, 0)
--- a/web/test/unittest_views_baseforms.py	Fri Apr 17 13:21:05 2009 +0200
+++ b/web/test/unittest_views_baseforms.py	Fri Apr 17 16:55:37 2009 +0200
@@ -49,7 +49,7 @@
         self.assertTextEquals(expected, cleanup_text(self._build_creation_form(etype)))
         
     def test_base(self):
-        self._test_view_for('EGroup', '''\
+        self._test_view_for('CWGroup', '''\
 <form id="entityForm" class="entityForm" cubicweb:target="eformframe"
 method="post" onsubmit="return freezeFormButtons('entityForm')" enctype="application/x-www-form-urlencoded" action="http://testing.fr/cubicweb/validateform">
 <div class="formTitle"><span>egroup (creation)</span></div>
@@ -57,7 +57,7 @@
 <div class="iformTitle"><span>main informations</span></div>
 <div class="formBody"><fieldset>
 <input type="hidden" name="eid" value="A" />
-<input type="hidden" name="__type:A" value="EGroup" />
+<input type="hidden" name="__type:A" value="CWGroup" />
 <input type="hidden" name="__maineid" value="A" />
 <input id="errorurl" type="hidden" name="__errorurl" value="http://testing.fr/cubicweb/view?rql=Blop&amp;vid=blop" />
 <input type="hidden" name="__form_id" value="edition" />
@@ -88,14 +88,14 @@
 
     def test_with_inline_view(self):
         activated = self.execute('Any X WHERE X is State, X name "activated"')[0][0]
-        self._test_view_for('EUser', '''<form id="entityForm" class="entityForm" cubicweb:target="eformframe"
+        self._test_view_for('CWUser', '''<form id="entityForm" class="entityForm" cubicweb:target="eformframe"
 method="post" onsubmit="return freezeFormButtons('entityForm')" enctype="application/x-www-form-urlencoded" action="http://testing.fr/cubicweb/validateform">
 <div class="formTitle"><span>euser (creation)</span></div>
 <div id="progress">validating...</div>
 <div class="iformTitle"><span>main informations</span></div>
 <div class="formBody"><fieldset>
 <input type="hidden" name="eid" value="A" />
-<input type="hidden" name="__type:A" value="EUser" />
+<input type="hidden" name="__type:A" value="CWUser" />
 <input type="hidden" name="__maineid" value="A" />
 <input id="errorurl" type="hidden" name="__errorurl" value="http://testing.fr/cubicweb/view?rql=Blop&amp;vid=blop" />
 <input type="hidden" name="__form_id" value="edition" />
@@ -159,7 +159,7 @@
 </table>
 <div id="inlineuse_emailslot">
 <div class="inlinedform" id="addNewEmailAddressuse_emailsubject:A" cubicweb:limit="true">
-<a class="addEntity" id="adduse_email:Alink" href="javascript: addInlineCreationForm('A', 'EUser', 'EmailAddress', 'use_email', 'subject')" >+ add a EmailAddress.</a>
+<a class="addEntity" id="adduse_email:Alink" href="javascript: addInlineCreationForm('A', 'CWUser', 'EmailAddress', 'use_email', 'subject')" >+ add a EmailAddress.</a>
 </div>
 <div class="trame_grise">&nbsp;</div>
 </div>
@@ -179,7 +179,7 @@
 
     def test_redirection_after_creation(self):
         req = self.request()
-        req.form['etype'] = 'EUser'
+        req.form['etype'] = 'CWUser'
         view = self.vreg.select_view('creation', req, None)
         self.assertEquals(view.redirect_url(), 'http://testing.fr/cubicweb/euser')
         req.form['__redirectrql'] = 'Any X WHERE X eid 3012'
@@ -229,7 +229,7 @@
 
 
     def test_cloned_elements_in_copy_form(self):
-        rset = self.execute('EUser P WHERE P login "Doe"')
+        rset = self.execute('CWUser P WHERE P login "Doe"')
         output = self.view('copy', rset)
         clones = [attrs for _, attrs in output.input_tags
                   if attrs.get('name', '').startswith('__cloned_eid')]
--- a/web/test/unittest_views_baseviews.py	Fri Apr 17 13:21:05 2009 +0200
+++ b/web/test/unittest_views_baseviews.py	Fri Apr 17 16:55:37 2009 +0200
@@ -39,7 +39,7 @@
         
     def test_more_than_one_entity(self):
         req = self.request()
-        rset = self.execute('Any X WHERE X is EUser')
+        rset = self.execute('Any X WHERE X is CWUser')
         self.assertEquals(vid_from_rset(req, rset, self.schema), 'list')
         rset = self.execute('Any X, L WHERE X login L')
         self.assertEquals(vid_from_rset(req, rset, self.schema), 'list')
@@ -58,16 +58,16 @@
         req = self.request()
         rset = self.execute('Any X, COUNT(T) GROUPBY X WHERE X is T')
         self.assertEquals(vid_from_rset(req, rset, self.schema), 'table')
-        rset = self.execute('Any MAX(X) WHERE X is EUser')
+        rset = self.execute('Any MAX(X) WHERE X is CWUser')
         self.assertEquals(vid_from_rset(req, rset, self.schema), 'table')
 
     def test_subquery(self):
         rset = self.execute(
 'DISTINCT Any X,N ORDERBY N '
 'WITH X,N BEING ('
-'     (DISTINCT Any P,N WHERE P is EUser, P login N)'
+'     (DISTINCT Any P,N WHERE P is CWUser, P login N)'
 '       UNION'
-'     (DISTINCT Any W,N WHERE W is EGroup, W name N))')
+'     (DISTINCT Any W,N WHERE W is CWGroup, W name N))')
         req = self.request()
         self.assertEquals(vid_from_rset(req, rset, self.schema), 'table')
 
--- a/web/test/unittest_views_editforms.py	Fri Apr 17 13:21:05 2009 +0200
+++ b/web/test/unittest_views_editforms.py	Fri Apr 17 16:55:37 2009 +0200
@@ -9,19 +9,19 @@
 class AutomaticEntityFormTC(EnvBasedTC):
 
     def test_custom_widget(self):
-        AEF.rwidgets.set_rtag(AutoCompletionWidget, 'login', 'subject', 'EUser')
+        AEF.rwidgets.set_rtag(AutoCompletionWidget, 'login', 'subject', 'CWUser')
         form = self.vreg.select_object('forms', 'edition', self.request(), None,
                                        entity=self.user())
         field = form.field_by_name('login')
         self.assertIsInstance(field.widget, AutoCompletionWidget)
-        AEF.rwidgets.del_rtag('login', 'subject', 'EUser')
+        AEF.rwidgets.del_rtag('login', 'subject', 'CWUser')
         
 
     def test_euser_relations_by_category(self):
         #for (rtype, role, stype, otype), tag in AEF.rcategories._tagdefs.items():
         #    if rtype == 'tags':
         #        print rtype, role, stype, otype, ':', tag
-        e = self.etype_instance('EUser')
+        e = self.etype_instance('CWUser')
         # see custom configuration in views.euser
         self.assertEquals(rbc(e, 'primary'),
                           [('login', 'subject'),
@@ -48,7 +48,7 @@
                                ('connait', 'subject'),
                                ('checked_by', 'object'),
                                ])
-        # owned_by is defined both as subject and object relations on EUser
+        # owned_by is defined both as subject and object relations on CWUser
         self.assertListEquals(rbc(e, 'generated'),
                               [('has_text', 'subject'),
                                ('identity', 'subject'),
@@ -63,8 +63,8 @@
                                ])
 
     def test_inlined_view(self):
-        self.failUnless(AEF.rinlined.etype_rtag('EUser', 'use_email', 'subject'))
-        self.failIf(AEF.rinlined.etype_rtag('EUser', 'primary_email', 'subject'))
+        self.failUnless(AEF.rinlined.etype_rtag('CWUser', 'use_email', 'subject'))
+        self.failIf(AEF.rinlined.etype_rtag('CWUser', 'primary_email', 'subject'))
         
     def test_personne_relations_by_category(self):
         e = self.etype_instance('Personne')
@@ -105,7 +105,7 @@
                                ])
         
     def test_edition_form(self):
-        rset = self.execute('EUser X LIMIT 1')
+        rset = self.execute('CWUser X LIMIT 1')
         form = self.vreg.select_object('forms', 'edition', rset.req, rset,
                                        row=0, col=0)
         # should be also selectable by specifying entity
@@ -116,36 +116,36 @@
         
 class FormViewsTC(WebTest):
     def test_delete_conf_formview(self):
-        rset = self.execute('EGroup X')
+        rset = self.execute('CWGroup X')
         self.view('deleteconf', rset, template=None).source
         
     def test_automatic_edition_formview(self):
-        rset = self.execute('EUser X')
+        rset = self.execute('CWUser X')
         self.view('edition', rset, row=0, template=None).source
         
     def test_automatic_edition_formview(self):
-        rset = self.execute('EUser X')
+        rset = self.execute('CWUser X')
         self.view('copy', rset, row=0, template=None).source
         
     def test_automatic_creation_formview(self):
-        self.view('creation', None, etype='EUser', template=None).source
+        self.view('creation', None, etype='CWUser', template=None).source
         
     def test_automatic_muledit_formview(self):
-        rset = self.execute('EUser X')
+        rset = self.execute('CWUser X')
         self.view('muledit', rset, template=None).source
         
     def test_automatic_reledit_formview(self):
-        rset = self.execute('EUser X')
+        rset = self.execute('CWUser X')
         self.view('reledit', rset, row=0, rtype='login', template=None).source
         
     def test_automatic_inline_edit_formview(self):
-        geid = self.execute('EGroup X LIMIT 1')[0][0]
-        rset = self.execute('EUser X LIMIT 1')
+        geid = self.execute('CWGroup X LIMIT 1')[0][0]
+        rset = self.execute('CWUser X LIMIT 1')
         self.view('inline-edition', rset, row=0, rtype='in_group', peid=geid, template=None).source
                               
     def test_automatic_inline_creation_formview(self):
-        geid = self.execute('EGroup X LIMIT 1')[0][0]
-        self.view('inline-creation', None, etype='EUser', rtype='in_group', peid=geid, template=None).source
+        geid = self.execute('CWGroup X LIMIT 1')[0][0]
+        self.view('inline-creation', None, etype='CWUser', rtype='in_group', peid=geid, template=None).source
 
         
 if __name__ == '__main__':
--- a/web/test/unittest_views_navigation.py	Fri Apr 17 13:21:05 2009 +0200
+++ b/web/test/unittest_views_navigation.py	Fri Apr 17 16:55:37 2009 +0200
@@ -53,7 +53,7 @@
         rset = self.execute('Any RDEF ORDERBY RDEF WHERE RDEF relation_type RT')
         navcomp = self.vreg.select_component('navigation', req, rset)
         html = navcomp.dispatch()
-        rset = self.execute('EFRDef RDEF ORDERBY RDEF')
+        rset = self.execute('CWAttribute RDEF ORDERBY RDEF')
         navcomp = self.vreg.select_component('navigation', req, rset)
         html = navcomp.dispatch()
         rset = self.execute('Any RDEF ORDERBY N WHERE RDEF relation_type RT, RT name N')
@@ -69,7 +69,7 @@
 
     def test_component_context(self):
         view = mock_object(is_primary=lambda x: True)
-        rset = self.execute('EUser X LIMIT 1')
+        rset = self.execute('CWUser X LIMIT 1')
         req = self.request()
         objs = self.vreg.possible_vobjects('contentnavigation', req, rset,
                                            view=view, context='navtop')
@@ -81,7 +81,7 @@
         # breadcrumbs should _NOT_ be in footers by default
         clsids = set(obj.id for obj in objs)
         self.failIf('breadcrumbs' in clsids)
-        self.execute('INSERT EProperty P: P pkey "contentnavigation.breadcrumbs.context", '
+        self.execute('INSERT CWProperty P: P pkey "contentnavigation.breadcrumbs.context", '
                      'P value "navbottom"')
         # breadcrumbs should now be in footers
         req.cnx.commit()
--- a/web/test/unittest_views_searchrestriction.py	Fri Apr 17 13:21:05 2009 +0200
+++ b/web/test/unittest_views_searchrestriction.py	Fri Apr 17 16:55:37 2009 +0200
@@ -28,25 +28,25 @@
     def test_1(self):
         self.assertEquals(self._generate(self.select, 'in_state', 'subject', 'name'),
                           "DISTINCT Any A,C ORDERBY C WHERE B in_group P, P name 'managers', "
-                          "B in_state A, A name C, B is EUser")
+                          "B in_state A, A name C, B is CWUser")
         
     def test_2(self):
         self.assertEquals(self._generate(self.select, 'tags', 'object', 'name'),
                           "DISTINCT Any A,C ORDERBY C WHERE B in_group P, P name 'managers', "
-                          "A tags B, A name C, B is EUser")
+                          "A tags B, A name C, B is CWUser")
         
     def test_3(self):
         self.assertEquals(self._generate(self.select, 'created_by', 'subject', 'login'),
                           "DISTINCT Any A,C ORDERBY C WHERE B in_group P, P name 'managers', "
-                          "B created_by A, A login C, B is EUser")
+                          "B created_by A, A login C, B is CWUser")
         
     def test_4(self):
-        self.assertEquals(self._generate(self.parse('Any X WHERE X is EUser'), 'created_by', 'subject', 'login'),
-                          "DISTINCT Any A,B ORDERBY B WHERE X is EUser, X created_by A, A login B")
+        self.assertEquals(self._generate(self.parse('Any X WHERE X is CWUser'), 'created_by', 'subject', 'login'),
+                          "DISTINCT Any A,B ORDERBY B WHERE X is CWUser, X created_by A, A login B")
         
     def test_5(self):
-        self.assertEquals(self._generate(self.parse('Any X,L WHERE X is EUser, X login L'), 'created_by', 'subject', 'login'),
-                          "DISTINCT Any A,B ORDERBY B WHERE X is EUser, X created_by A, A login B")
+        self.assertEquals(self._generate(self.parse('Any X,L WHERE X is CWUser, X login L'), 'created_by', 'subject', 'login'),
+                          "DISTINCT Any A,B ORDERBY B WHERE X is CWUser, X created_by A, A login B")
         
     def test_nonregr1(self):
         select = self.parse('Any T,V WHERE T bookmarked_by V?, '
@@ -57,14 +57,14 @@
 
     def test_nonregr2(self):
         #'DISTINCT Any X,TMP,N WHERE P name TMP, X version_of P, P is Project, X is Version, not X in_state S,S name "published", X num N ORDERBY TMP,N'
-        select = self.parse('DISTINCT Any V,TN,L ORDERBY TN,L WHERE T nom TN, V connait T, T is Personne, V is EUser,'
+        select = self.parse('DISTINCT Any V,TN,L ORDERBY TN,L WHERE T nom TN, V connait T, T is Personne, V is CWUser,'
                             'NOT V in_state VS, VS name "published", V login L')
         rschema = self.schema['connait']
         for s, o in rschema.iter_rdefs():
             rschema.set_rproperty(s, o, 'cardinality', '++')
         try:
             self.assertEquals(self._generate(select, 'in_state', 'subject', 'name'),
-                              "DISTINCT Any A,B ORDERBY B WHERE V is EUser, "
+                              "DISTINCT Any A,B ORDERBY B WHERE V is CWUser, "
                               "NOT V in_state VS, VS name 'published', "
                               "V in_state A, A name B")
         finally:
@@ -73,9 +73,9 @@
 
     def test_nonregr3(self):
         #'DISTINCT Any X,TMP,N WHERE P name TMP, X version_of P, P is Project, X is Version, not X in_state S,S name "published", X num N ORDERBY TMP,N'
-        select = self.parse('DISTINCT Any X, MAX(Y) GROUPBY X WHERE X is EUser, Y is Bookmark, X in_group A')
+        select = self.parse('DISTINCT Any X, MAX(Y) GROUPBY X WHERE X is CWUser, Y is Bookmark, X in_group A')
         self.assertEquals(self._generate(select, 'in_group', 'subject', 'name'),
-                          "DISTINCT Any B,C ORDERBY C WHERE X is EUser, X in_group B, B name C")
+                          "DISTINCT Any B,C ORDERBY C WHERE X is CWUser, X in_group B, B name C")
 
         
 if __name__ == '__main__':
--- a/web/test/unittest_viewselector.py	Fri Apr 17 13:21:05 2009 +0200
+++ b/web/test/unittest_viewselector.py	Fri Apr 17 16:55:37 2009 +0200
@@ -80,7 +80,7 @@
                              [])
         
     def test_possible_views_one_egroup(self):
-        rset, req = self.env.get_rset_and_req('EGroup X WHERE X name "managers"')
+        rset, req = self.env.get_rset_and_req('CWGroup X WHERE X name "managers"')
         self.assertListEqual(self.pviews(req, rset),
                              [('csvexport', baseviews.CSVRsetView),
                               ('ecsvexport', baseviews.CSVEntityView),
@@ -102,7 +102,7 @@
                               ])
             
     def test_possible_views_multiple_egroups(self):
-        rset, req = self.env.get_rset_and_req('EGroup X')
+        rset, req = self.env.get_rset_and_req('CWGroup X')
         self.assertListEqual(self.pviews(req, rset),
                              [('csvexport', baseviews.CSVRsetView),
                               ('ecsvexport', baseviews.CSVEntityView),
@@ -155,7 +155,7 @@
                               ])
 
     def test_possible_views_multiple_eusers(self):
-        rset, req = self.env.get_rset_and_req('EUser X')
+        rset, req = self.env.get_rset_and_req('CWUser X')
         self.assertListEqual(self.pviews(req, rset),
                              [('csvexport', baseviews.CSVRsetView),
                               ('ecsvexport', baseviews.CSVEntityView),
@@ -165,7 +165,7 @@
                               ('list', baseviews.ListView),
                               ('oneline', baseviews.OneLineView),
                               ('owlabox', owl.OWLABOXView),
-                              ('primary', euser.EUserPrimaryView),
+                              ('primary', euser.CWUserPrimaryView),
                               ('rsetxml', baseviews.XMLRsetView),
                               ('rss', baseviews.RssView),
                               ('secondary', baseviews.SecondaryView),
@@ -173,7 +173,7 @@
                               ('table', tableview.TableView),
                               ('text', baseviews.TextView),
                               ('treeview', treeview.TreeView),
-                              ('vcard', vcard.VCardEUserView),
+                              ('vcard', vcard.VCardCWUserView),
                               ('xbel', xbel.XbelView),
                               ('xml', baseviews.XmlView),
                               ])
@@ -193,7 +193,7 @@
                               })
         
     def test_possible_actions_same_type_entities(self):
-        rset, req = self.env.get_rset_and_req('EGroup X')
+        rset, req = self.env.get_rset_and_req('CWGroup X')
         self.assertDictEqual(self.pactions(req, rset),
                              {'useractions': USERACTIONS,
                               'siteactions': SITEACTIONS,
@@ -217,7 +217,7 @@
                               'siteactions': SITEACTIONS})
         
     def test_possible_actions_eetype_euser_entity(self):
-        rset, req = self.env.get_rset_and_req('EEType X WHERE X name "EUser"')
+        rset, req = self.env.get_rset_and_req('CWEType X WHERE X name "CWUser"')
         self.assertDictEqual(self.pactions(req, rset),
                              {'useractions': USERACTIONS,
                               'siteactions': SITEACTIONS,
@@ -233,17 +233,17 @@
         rset = None
         req = self.request()
         # creation form
-        req.form['etype'] = 'EGroup'
+        req.form['etype'] = 'CWGroup'
         self.assertIsInstance(self.vreg.select_view('creation', req, rset),
                                   baseforms.CreationForm)
         del req.form['etype']
         # custom creation form
-        class EUserCreationForm(baseforms.CreationForm):
-            __select__ = specified_etype_implements('EUser')
-        self.vreg.register_vobject_class(EUserCreationForm)
-        req.form['etype'] = 'EUser'
+        class CWUserCreationForm(baseforms.CreationForm):
+            __select__ = specified_etype_implements('CWUser')
+        self.vreg.register_vobject_class(CWUserCreationForm)
+        req.form['etype'] = 'CWUser'
         self.assertIsInstance(self.vreg.select_view('creation', req, rset),
-                              EUserCreationForm)
+                              CWUserCreationForm)
             
     def test_select_view(self):
         # no entity
@@ -267,7 +267,7 @@
         self.failUnlessRaises(NoSelectableObject,
                              self.vreg.select_view, 'table', req, rset)
         # one entity
-        rset, req = self.env.get_rset_and_req('EGroup X WHERE X name "managers"')
+        rset, req = self.env.get_rset_and_req('CWGroup X WHERE X name "managers"')
         self.assertIsInstance(self.vreg.select_view('primary', req, rset),
                              baseviews.PrimaryView)
         self.assertIsInstance(self.vreg.select_view('list', req, rset),
@@ -281,7 +281,7 @@
         self.failUnlessRaises(NoSelectableObject,
                               self.vreg.select_view, 'index', req, rset)
         # list of entities of the same type
-        rset, req = self.env.get_rset_and_req('EGroup X')
+        rset, req = self.env.get_rset_and_req('CWGroup X')
         self.assertIsInstance(self.vreg.select_view('primary', req, rset),
                              baseviews.PrimaryView)
         self.assertIsInstance(self.vreg.select_view('list', req, rset),
@@ -317,7 +317,7 @@
         self.failUnlessRaises(NoSelectableObject,
                              self.vreg.select_view, 'edition', req, rset)
         # mixed query
-        rset, req = self.env.get_rset_and_req('Any U,G WHERE U is EUser, G is EGroup')
+        rset, req = self.env.get_rset_and_req('Any U,G WHERE U is CWUser, G is CWGroup')
         self.failUnlessRaises(NoSelectableObject,
                               self.vreg.select_view, 'edition', req, rset)
         self.failUnlessRaises(NoSelectableObject,
@@ -325,9 +325,9 @@
         self.assertIsInstance(self.vreg.select_view('table', req, rset),
                               tableview.TableView)
         # euser primary view priority
-        rset, req = self.env.get_rset_and_req('EUser X WHERE X login "admin"')
+        rset, req = self.env.get_rset_and_req('CWUser X WHERE X login "admin"')
         self.assertIsInstance(self.vreg.select_view('primary', req, rset),
-                             euser.EUserPrimaryView)
+                             euser.CWUserPrimaryView)
         self.assertIsInstance(self.vreg.select_view('text', req, rset),
                              baseviews.TextView)
 
@@ -367,9 +367,9 @@
     def test_form(self):
         for vid, rql, args in (
             #('creation', 'Any X WHERE X eid 999999', {}),
-            ('edition', 'EGroup X WHERE X name "managers"', {}),
-            ('copy', 'EGroup X WHERE X name "managers"', {}),
-            ('muledit', 'EGroup X', {}),
+            ('edition', 'CWGroup X WHERE X name "managers"', {}),
+            ('copy', 'CWGroup X WHERE X name "managers"', {}),
+            ('muledit', 'CWGroup X', {}),
             #('muledit', 'Any X', {}),
             ):
             self._test_view(vid, rql, args)
@@ -405,7 +405,7 @@
             self.create_user('john')
             self.login('john')
             # it should not be possible to use SomeAction not owned objects
-            rset, req = self.env.get_rset_and_req('Any G WHERE G is EGroup, G name "managers"')
+            rset, req = self.env.get_rset_and_req('Any G WHERE G is CWGroup, G name "managers"')
             self.failIf('foo' in self.pactions(req, rset))
             # insert a new card, and check that we can use SomeAction on our object
             self.execute('INSERT Card C: C title "zoubidou"')
@@ -420,33 +420,33 @@
             del self.vreg[SomeAction.__registry__][SomeAction.id]
 
 
-class EETypeRQLAction(Action):
+class CWETypeRQLAction(Action):
     id = 'testaction'
-    __select__ = implements('EEType') & rql_condition('X name "EEType"')
+    __select__ = implements('CWEType') & rql_condition('X name "CWEType"')
     title = 'bla'
 
 class RQLActionTC(ViewSelectorTC):
             
     def setUp(self):
         super(RQLActionTC, self).setUp()
-        self.vreg.register_vobject_class(EETypeRQLAction)
+        self.vreg.register_vobject_class(CWETypeRQLAction)
         
     def tearDown(self):
         super(RQLActionTC, self).tearDown()        
         del self.vreg._registries['actions']['testaction']
         
     def test(self):
-        rset, req = self.env.get_rset_and_req('EEType X WHERE X name "EEType"')
+        rset, req = self.env.get_rset_and_req('CWEType X WHERE X name "CWEType"')
         self.assertDictEqual(self.pactions(req, rset),
                              {'useractions': USERACTIONS,
                               'siteactions': SITEACTIONS,
                               'mainactions': [('edit', actions.ModifyAction)],
                               'moreactions': [('delete', actions.DeleteAction),
                                               ('copy', actions.CopyAction),
-                                              ('testaction', EETypeRQLAction),
+                                              ('testaction', CWETypeRQLAction),
                                               ('managepermission', actions.ManagePermissionsAction)],
                               })
-        rset, req = self.env.get_rset_and_req('EEType X WHERE X name "ERType"')
+        rset, req = self.env.get_rset_and_req('CWEType X WHERE X name "CWRType"')
         self.assertDictEqual(self.pactions(req, rset),
                              {'useractions': USERACTIONS,
                               'siteactions': SITEACTIONS,
--- a/web/test/unittest_widgets.py	Fri Apr 17 13:21:05 2009 +0200
+++ b/web/test/unittest_widgets.py	Fri Apr 17 16:55:37 2009 +0200
@@ -32,7 +32,7 @@
                            u'<input type="hidden" name="eid" value="X" />')
 
     def test_textarea_widget(self):
-        self.add_entity('EProperty', pkey=u'ui.fckeditor', value=u'')
+        self.add_entity('CWProperty', pkey=u'ui.fckeditor', value=u'')
         self.commit()
         w = self.get_widget('State', 'description', 'String')
         self.assertEquals(w.name, 'description')
@@ -58,7 +58,7 @@
 </select><br/><textarea onkeypress="autogrow(this)" name="description:X" accesskey="d" cols="80" id="description:X" rows="20" tabindex="1"></textarea>''' % tal_format)
 
     def test_textarea_widget_previous_value(self):
-        self.add_entity('EProperty', pkey=u'ui.fckeditor', value=u'')
+        self.add_entity('CWProperty', pkey=u'ui.fckeditor', value=u'')
         self.commit()
         w = self.get_widget('State', 'description', 'String')
         req = self.request()
@@ -284,11 +284,11 @@
 
 
     def test_password_widget(self):
-        w = self.get_widget('EUser', 'upassword', 'Password')
+        w = self.get_widget('CWUser', 'upassword', 'Password')
         self.assertEquals(w.name, 'upassword')
         self.assertEquals(w.render_example(self.request()), '')
         self.assertDictEquals(w.attrs, {'accesskey': 'u'})
-        entity = self.etype_instance('EUser')
+        entity = self.etype_instance('CWUser')
         entity.eid = 'X'
         self.assertEquals(w.required(entity), True)
         self.assertEquals(w.render(entity), '')
--- a/web/views/actions.py	Fri Apr 17 13:21:05 2009 +0200
+++ b/web/views/actions.py	Fri Apr 17 16:55:37 2009 +0200
@@ -162,7 +162,7 @@
         if 'require_permission' in vreg.schema:
             cls.__select__ = (one_line_rset() & non_final_entity() &
                               (match_user_groups('managers')
-                               | relation_possible('require_permission', 'subject', 'EPermission',
+                               | relation_possible('require_permission', 'subject', 'CWPermission',
                                                    action='add')))
         return super(ManagePermissionsAction, cls).registered(vreg)
     
--- a/web/views/basecontrollers.py	Fri Apr 17 13:21:05 2009 +0200
+++ b/web/views/basecontrollers.py	Fri Apr 17 16:55:37 2009 +0200
@@ -387,8 +387,8 @@
         return self.req.external_resource(resource)
 
     def js_prop_widget(self, propkey, varname, tabindex=None):
-        """specific method for EProperty handling"""
-        entity = self.vreg.etype_class('EProperty')(self.req, None, None)
+        """specific method for CWProperty handling"""
+        entity = self.vreg.etype_class('CWProperty')(self.req, None, None)
         entity.eid = varname
         entity['pkey'] = propkey
         form = self.vreg.select_object('forms', 'edition', self.req, None,
--- a/web/views/calendar.py	Fri Apr 17 13:21:05 2009 +0200
+++ b/web/views/calendar.py	Fri Apr 17 16:55:37 2009 +0200
@@ -155,7 +155,7 @@
         task_max = 0
         for row in xrange(self.rset.rowcount):
             task = self.rset.get_entity(row, 0)
-            if len(self.rset[row]) > 1 and self.rset.description[row][1] == 'EUser':
+            if len(self.rset[row]) > 1 and self.rset.description[row][1] == 'CWUser':
                 user = self.rset.get_entity(row, 1)
             else:
                 user = None
--- a/web/views/eproperties.py	Fri Apr 17 13:21:05 2009 +0200
+++ b/web/views/eproperties.py	Fri Apr 17 16:55:37 2009 +0200
@@ -1,4 +1,4 @@
-"""Specific views for EProperty
+"""Specific views for CWProperty
 
 :organization: Logilab
 :copyright: 2007-2009 LOGILAB S.A. (Paris, FRANCE), all rights reserved.
@@ -45,8 +45,8 @@
     return someclass and 'class="%s"' % someclass or ''
 
 
-class EPropertyPrimaryView(baseviews.PrimaryView):
-    __select__ = implements('EProperty')
+class CWPropertyPrimaryView(baseviews.PrimaryView):
+    __select__ = implements('CWProperty')
     skip_none = False
 
 
@@ -141,7 +141,7 @@
     @property
     @cached
     def eprops_rset(self):
-        return self.req.execute('Any P,K,V WHERE P is EProperty, P pkey K, '
+        return self.req.execute('Any P,K,V WHERE P is CWProperty, P pkey K, '
                                 'P value V, NOT P for_user U')
 
     @property
@@ -156,7 +156,7 @@
         if key in values:
             entity = self.eprops_rset.get_entity(values[key], 0)
         else:
-            entity = self.vreg.etype_class('EProperty')(self.req, None, None)
+            entity = self.vreg.etype_class('CWProperty')(self.req, None, None)
             entity.eid = self.req.varmaker.next()
             entity['pkey'] = key
             entity['value'] = self.vreg.property_value(key)
@@ -216,7 +216,7 @@
     @property
     @cached
     def eprops_rset(self):
-        return self.req.execute('Any P,K,V WHERE P is EProperty, P pkey K, P value V,'
+        return self.req.execute('Any P,K,V WHERE P is CWProperty, P pkey K, P value V,'
                                 'P for_user U, U eid %(x)s', {'x': self.user.eid})
 
     def form_row(self, form, key, splitlabel):
@@ -253,7 +253,7 @@
 
 
 class PropertyKeyField(StringField):
-    """specific field for EProperty.pkey to set the value widget according to
+    """specific field for CWProperty.pkey to set the value widget according to
     the selected key
     """
     widget = Select
@@ -276,7 +276,7 @@
 
 
 class PropertyValueField(StringField):
-    """specific field for EProperty.value  which will be different according to
+    """specific field for CWProperty.value  which will be different according to
     the selected key type and vocabulary information
     """
     widget = PlaceHolderWidget
@@ -305,7 +305,7 @@
             msg = form.req._('value associated to this key is not editable '
                              'manually')
             self.widget = NotEditableWidget(entity.printable_value('value'), msg)
-        # XXX race condition when used from EPropertyForm, should not rely on
+        # XXX race condition when used from CWPropertyForm, should not rely on
         # instance attributes
         self.initial = pdef['default']
         self.help = pdef['help']
@@ -325,6 +325,6 @@
                 wdg.attrs.setdefault('size', 3)
         self.widget = wdg
 
-uicfg.rfields.set_rtag(PropertyKeyField, 'pkey', 'subject', 'EProperty')
-uicfg.rfields.set_rtag(PropertyValueField, 'value', 'subject', 'EProperty')
+uicfg.rfields.set_rtag(PropertyKeyField, 'pkey', 'subject', 'CWProperty')
+uicfg.rfields.set_rtag(PropertyValueField, 'value', 'subject', 'CWProperty')
     
--- a/web/views/euser.py	Fri Apr 17 13:21:05 2009 +0200
+++ b/web/views/euser.py	Fri Apr 17 16:55:37 2009 +0200
@@ -14,23 +14,23 @@
 from cubicweb.web.views.baseviews import PrimaryView
 
 
-uicfg.rcategories.set_rtag('secondary', 'firstname', 'subject', 'EUser')
-uicfg.rcategories.set_rtag('secondary', 'surname', 'subject', 'EUser')
-uicfg.rcategories.set_rtag('metadata', 'last_login_time', 'subject', 'EUser')
-uicfg.rcategories.set_rtag('primary', 'in_group', 'subject', 'EUser')
-uicfg.rcategories.set_rtag('generated', 'owned_by', 'object', otype='EUser')
-uicfg.rcategories.set_rtag('generated', 'created_by', 'object', otype='EUser')
-uicfg.rcategories.set_rtag('metadata', 'bookmarked_by', 'object', otype='EUser')
-uicfg.rinlined.set_rtag(True, 'use_email', 'subject', 'EUser')
-uicfg.rmode.set_rtag('create', 'in_group', 'subject', 'EGroup')
-uicfg.rmode.set_rtag('link', 'owned_by', 'object', 'EUser')
-uicfg.rmode.set_rtag('link', 'created_by', 'object', 'EUser')
-uicfg.rmode.set_rtag('create', 'bookmarked_by', 'object', 'EUser')
+uicfg.rcategories.set_rtag('secondary', 'firstname', 'subject', 'CWUser')
+uicfg.rcategories.set_rtag('secondary', 'surname', 'subject', 'CWUser')
+uicfg.rcategories.set_rtag('metadata', 'last_login_time', 'subject', 'CWUser')
+uicfg.rcategories.set_rtag('primary', 'in_group', 'subject', 'CWUser')
+uicfg.rcategories.set_rtag('generated', 'owned_by', 'object', otype='CWUser')
+uicfg.rcategories.set_rtag('generated', 'created_by', 'object', otype='CWUser')
+uicfg.rcategories.set_rtag('metadata', 'bookmarked_by', 'object', otype='CWUser')
+uicfg.rinlined.set_rtag(True, 'use_email', 'subject', 'CWUser')
+uicfg.rmode.set_rtag('create', 'in_group', 'subject', 'CWGroup')
+uicfg.rmode.set_rtag('link', 'owned_by', 'object', 'CWUser')
+uicfg.rmode.set_rtag('link', 'created_by', 'object', 'CWUser')
+uicfg.rmode.set_rtag('create', 'bookmarked_by', 'object', 'CWUser')
     
 
 class UserPreferencesEntityAction(action.Action):
     id = 'prefs'
-    __select__ = (one_line_rset() & implements('EUser') &
+    __select__ = (one_line_rset() & implements('CWUser') &
                   match_user_groups('owners', 'managers'))
     
     title = _('preferences')
@@ -41,14 +41,14 @@
         return self.build_url('euser/%s'%login, vid='epropertiesform')
 
 
-class EUserPrimaryView(PrimaryView):
-    __select__ = implements('EUser')
+class CWUserPrimaryView(PrimaryView):
+    __select__ = implements('CWUser')
     
     skip_attrs = ('firstname', 'surname')
     
     def iter_relations(self, entity):
         # don't want to display user's entities
-        for rschema, targetschemas, x in super(EUserPrimaryView, self).iter_relations(entity):
+        for rschema, targetschemas, x in super(CWUserPrimaryView, self).iter_relations(entity):
             if x == 'object' and rschema.type in ('owned_by', 'for_user'):
                 continue
             yield rschema, targetschemas, x
@@ -63,7 +63,7 @@
                                  ]
 class FoafView(EntityView):
     id = 'foaf'
-    __select__ = implements('EUser')
+    __select__ = implements('CWUser')
     
     title = _('foaf')
     templatable = False
@@ -96,3 +96,6 @@
         if emailaddr:
             self.w(u'<foaf:mbox>%s</foaf:mbox>\n' % html_escape(emailaddr))
         self.w(u'</foaf:Person>\n')
+
+from logilab.common.deprecation import class_renamed
+EUserPrimaryView = class_renamed('EUserPrimaryView', CWUserPrimaryView)
--- a/web/views/management.py	Fri Apr 17 13:21:05 2009 +0200
+++ b/web/views/management.py	Fri Apr 17 16:55:37 2009 +0200
@@ -144,7 +144,7 @@
     def require_permission_edit_form(self, entity):
         w = self.w
         _ = self.req._
-        newperm = self.vreg.etype_class('EPermission')(self.req, None)
+        newperm = self.vreg.etype_class('CWPermission')(self.req, None)
         newperm.eid = self.req.varmaker.next()
         w(u'<p>%s</p>' % _('add a new permission'))
         begin_form(w, newperm, 'security', entity.rest_path())
@@ -156,7 +156,7 @@
         w(u'<tr><th>%s</th><th>%s</th><th>%s</th><th>&nbsp;</th></tr>\n'
                % (_("name"), _("label"), _('granted to groups')))
         if getattr(entity, '__permissions__', None):
-            wdg = StaticComboBoxWidget(self.vreg, self.schema['EPermission'],
+            wdg = StaticComboBoxWidget(self.vreg, self.schema['CWPermission'],
                                        self.schema['name'], self.schema['String'],
                                        vocabfunc=lambda x: entity.__permissions__)
         else:
--- a/web/views/schema.py	Fri Apr 17 13:21:05 2009 +0200
+++ b/web/views/schema.py	Fri Apr 17 16:55:37 2009 +0200
@@ -22,19 +22,19 @@
 from cubicweb.web.views.boxes import EditBox
 
 
-AutomaticEntityForm.rcategories.set_rtag('primary', 'require_group', 'subject', 'EPermission')
+AutomaticEntityForm.rcategories.set_rtag('primary', 'require_group', 'subject', 'CWPermission')
 AutomaticEntityForm.rcategories.set_rtag('generated', 'final', 'subject', 'EEtype')
 AutomaticEntityForm.rcategories.set_rtag('generated', 'final', 'subject', 'ERtype')
-AutomaticEntityForm.rinlined.set_rtag(True, 'relation_type', 'subject', 'ENFRDef')
-AutomaticEntityForm.rinlined.set_rtag(True, 'from_entity', 'subject', 'ENFRDef')
-AutomaticEntityForm.rinlined.set_rtag(True, 'to_entity', 'subject', 'ENFRDef')
+AutomaticEntityForm.rinlined.set_rtag(True, 'relation_type', 'subject', 'CWRelation')
+AutomaticEntityForm.rinlined.set_rtag(True, 'from_entity', 'subject', 'CWRelation')
+AutomaticEntityForm.rinlined.set_rtag(True, 'to_entity', 'subject', 'CWRelation')
 AutomaticEntityForm.rwidgets.set_rtag('StringWidget', 'expression', 'subject', 'RQLExpression')
 
-EditBox.rmode.set_rtag('create', 'state_of', 'object', 'EEType')
-EditBox.rmode.set_rtag('create', 'transition_of', 'object', 'EEType')
-EditBox.rmode.set_rtag('create', 'relation_type', 'object', 'ERType')
-EditBox.rmode.set_rtag('link', 'from_entity', 'object', 'EEType')
-EditBox.rmode.set_rtag('link', 'to_entity', 'object', 'EEType')
+EditBox.rmode.set_rtag('create', 'state_of', 'object', 'CWEType')
+EditBox.rmode.set_rtag('create', 'transition_of', 'object', 'CWEType')
+EditBox.rmode.set_rtag('create', 'relation_type', 'object', 'CWRType')
+EditBox.rmode.set_rtag('link', 'from_entity', 'object', 'CWEType')
+EditBox.rmode.set_rtag('link', 'to_entity', 'object', 'CWEType')
 
 
 class ViewSchemaAction(Action):
@@ -58,35 +58,35 @@
     def content_title(self, entity):
         return html_escape(entity.dc_long_title())
     
-class EETypePrimaryView(_SchemaEntityPrimaryView):
-    __select__ = implements('EEType')
+class CWETypePrimaryView(_SchemaEntityPrimaryView):
+    __select__ = implements('CWEType')
     skip_attrs = _SchemaEntityPrimaryView.skip_attrs + ('name', 'meta', 'final')
 
-class ERTypePrimaryView(_SchemaEntityPrimaryView):
-    __select__ = implements('ERType')
+class CWRTypePrimaryView(_SchemaEntityPrimaryView):
+    __select__ = implements('CWRType')
     skip_attrs = _SchemaEntityPrimaryView.skip_attrs + ('name', 'meta', 'final',
                                                         'symetric', 'inlined')
 
 class ErdefPrimaryView(_SchemaEntityPrimaryView):
-    __select__ = implements('EFRDef', 'ENFRDef')
+    __select__ = implements('CWAttribute', 'CWRelation')
     show_attr_label = True
 
-class EETypeOneLineView(baseviews.OneLineView):
-    __select__ = implements('EEType')
+class CWETypeOneLineView(baseviews.OneLineView):
+    __select__ = implements('CWEType')
     
     def cell_call(self, row, col, **kwargs):
         entity = self.entity(row, col)
         final = entity.final
         if final:
             self.w(u'<em class="finalentity">')
-        super(EETypeOneLineView, self).cell_call(row, col, **kwargs)
+        super(CWETypeOneLineView, self).cell_call(row, col, **kwargs)
         if final:
             self.w(u'</em>')
 
 
 # in memory schema views (yams class instances) ###############################
 
-class EETypeSchemaView(EETypePrimaryView):
+class CWETypeSchemaView(CWETypePrimaryView):
     id = 'eschema'
     title = _('in memory entity schema')
     main_related_section = False
@@ -94,7 +94,7 @@
                  'has_text',)
     
     def render_entity_attributes(self, entity, siderelations):
-        super(EETypeSchemaView, self).render_entity_attributes(entity, siderelations)
+        super(CWETypeSchemaView, self).render_entity_attributes(entity, siderelations)
         eschema = self.vreg.schema.eschema(entity.name)
         viewer = SchemaViewer(self.req)
         layout = viewer.visit_entityschema(eschema, skiprels=self.skip_rels)
@@ -105,13 +105,13 @@
                 html_escape(self.req._('graphical schema for %s') % entity.name)))
 
 
-class ERTypeSchemaView(ERTypePrimaryView):
+class CWRTypeSchemaView(CWRTypePrimaryView):
     id = 'eschema'
     title = _('in memory relation schema')
     main_related_section = False
 
     def render_entity_attributes(self, entity, siderelations):
-        super(ERTypeSchemaView, self).render_entity_attributes(entity, siderelations)
+        super(CWRTypeSchemaView, self).render_entity_attributes(entity, siderelations)
         rschema = self.vreg.schema.rschema(entity.name)
         viewer = SchemaViewer(self.req)
         layout = viewer.visit_relationschema(rschema)
@@ -125,7 +125,7 @@
 # schema images ###############################################################
 
 class ImageView(EntityView):
-    __select__ = implements('EEType')
+    __select__ = implements('CWEType')
     id = 'image'
     title = _('image')
 
@@ -210,10 +210,10 @@
         s2d.schema2dot(outputfile=tmpfile, visitor=visitor,
                        prophdlr=RestrictedSchemaDotPropsHandler(self.req))
 
-class EETypeSchemaImageView(TmpFileViewMixin, EntityView):
+class CWETypeSchemaImageView(TmpFileViewMixin, EntityView):
     id = 'eschemagraph'
     content_type = 'image/png'
-    __select__ = implements('EEType')
+    __select__ = implements('CWEType')
     skip_rels = ('owned_by', 'created_by', 'identity', 'is', 'is_instance_of')
     
     def _generate(self, tmpfile):
@@ -224,8 +224,8 @@
         s2d.schema2dot(outputfile=tmpfile, visitor=visitor,
                        prophdlr=RestrictedSchemaDotPropsHandler(self.req))
 
-class ERTypeSchemaImageView(EETypeSchemaImageView):
-    __select__ = implements('ERType')
+class CWRTypeSchemaImageView(CWETypeSchemaImageView):
+    __select__ = implements('CWRType')
     
     def _generate(self, tmpfile):
         """display schema information for an entity"""
--- a/web/views/startup.py	Fri Apr 17 13:21:05 2009 +0200
+++ b/web/views/startup.py	Fri Apr 17 16:55:37 2009 +0200
@@ -92,7 +92,7 @@
             self.w(u'<tr><th colspan="4">%s</th></tr>\n' % self.req._('system entities'))
             self.entity_types_table(eschema for eschema in schema.entities()
                                     if eschema.meta and not eschema.schema_entity())
-            if 'EFRDef' in schema: # check schema support
+            if 'CWAttribute' in schema: # check schema support
                 self.w(u'<tr><th colspan="4">%s</th></tr>\n' % self.req._('schema entities'))
                 self.entity_types_table(schema.eschema(etype)
                                         for etype in schema.schema_entity_types())
--- a/web/views/urlrewrite.py	Fri Apr 17 13:21:05 2009 +0200
+++ b/web/views/urlrewrite.py	Fri Apr 17 16:55:37 2009 +0200
@@ -80,7 +80,7 @@
         ('/manage', dict(vid='manage')),
         ('/notfound', dict(vid='404')),
         ('/error', dict(vid='error')),
-        (rgx('/schema/([^/]+?)/?'),  dict(vid='eschema', rql=r'Any X WHERE X is EEType, X name "\1"')),
+        (rgx('/schema/([^/]+?)/?'),  dict(vid='eschema', rql=r'Any X WHERE X is CWEType, X name "\1"')),
         (rgx('/add/([^/]+?)/?'), dict(vid='creation', etype=r'\1')),
         (rgx('/doc/images/(.+?)/?'), dict(vid='wdocimages', fid=r'\1')),
         (rgx('/doc/?'), dict(vid='wdoc', fid=r'main')),
--- a/web/views/vcard.py	Fri Apr 17 13:21:05 2009 +0200
+++ b/web/views/vcard.py	Fri Apr 17 16:55:37 2009 +0200
@@ -13,13 +13,13 @@
 
 VCARD_PHONE_TYPES = {'home': 'HOME', 'office': 'WORK', 'mobile': 'CELL', 'fax': 'FAX'}
 
-class VCardEUserView(EntityView):
+class VCardCWUserView(EntityView):
     """export a person information as a vcard"""
     id = 'vcard'
     title = _('vcard')
     templatable = False
     content_type = 'text/x-vcard'
-    __select__ = implements('EUser')        
+    __select__ = implements('CWUser')        
 
     def set_request_content_type(self):
         """overriden to set a .vcf filename"""
@@ -49,4 +49,4 @@
             w(u'EMAIL;TYPE=INTERNET:%s\n' % email.address)
 
 from logilab.common.deprecation import class_renamed
-VCardEuserView = class_renamed('VCardEuserView', VCardEUserView)
+VCardEuserView = class_renamed('VCardEuserView', VCardCWUserView)
--- a/web/views/workflow.py	Fri Apr 17 13:21:05 2009 +0200
+++ b/web/views/workflow.py	Fri Apr 17 16:55:37 2009 +0200
@@ -86,12 +86,12 @@
         rql = ' ORDERBY D DESC WHERE WF wf_info_for X,'\
               'WF from_state FS, WF to_state TS, WF comment C,'\
               'WF creation_date D'
-        if self.vreg.schema.eschema('EUser').has_perm(self.req, 'read'):
+        if self.vreg.schema.eschema('CWUser').has_perm(self.req, 'read'):
             sel += ',U,C'
             rql += ', WF owned_by U?'
             displaycols = range(5)
             headers = (_('from_state'), _('to_state'), _('comment'), _('date'),
-                       _('EUser'))            
+                       _('CWUser'))            
         else:
             sel += ',C'
             displaycols = range(4)
@@ -130,7 +130,7 @@
         
 class ViewWorkflowAction(action.Action):
     id = 'workflow'
-    __select__ = implements('EEType') & has_related_entities('state_of', 'object')
+    __select__ = implements('CWEType') & has_related_entities('state_of', 'object')
     
     category = 'mainactions'
     title = _('view workflow')
@@ -139,9 +139,9 @@
         return entity.absolute_url(vid='workflow')
 
         
-class EETypeWorkflowView(view.EntityView):
+class CWETypeWorkflowView(view.EntityView):
     id = 'workflow'
-    __select__ = implements('EEType')
+    __select__ = implements('CWEType')
     cache_max_age = 60*60*2 # stay in http cache for 2 hours by default 
     
     def cell_call(self, row, col, **kwargs):
@@ -205,10 +205,10 @@
             yield transition.eid, transition.destination().eid, transition
 
 
-class EETypeWorkflowImageView(TmpFileViewMixin, view.EntityView):
+class CWETypeWorkflowImageView(TmpFileViewMixin, view.EntityView):
     id = 'ewfgraph'
     content_type = 'image/png'
-    __select__ = implements('EEType')
+    __select__ = implements('CWEType')
     
     def _generate(self, tmpfile):
         """display schema information for an entity"""
--- a/web/wdoc/tut_rql_en.rst	Fri Apr 17 13:21:05 2009 +0200
+++ b/web/wdoc/tut_rql_en.rst	Fri Apr 17 16:55:37 2009 +0200
@@ -127,16 +127,16 @@
 * `creation_date (Datetime)`, date on which the entity has been created
 * `modification_date (Datetime)`, lastest date on which the entity has been modified
 
-* `created_by (EUser)`, relation to the user which has created this entity
+* `created_by (CWUser)`, relation to the user which has created this entity
 
-* `owned_by (EUser)`, relation to the user()s considered as owner of this
+* `owned_by (CWUser)`, relation to the user()s considered as owner of this
   entity, the entity's creator by default
 
 * `is (Eetype)`, special relation to specify a variable type.
 
 A user's entity has the following schema:
 
-:EUser:
+:CWUser:
   ::
 
 	login  	  (String) not null
--- a/web/wdoc/tut_rql_fr.rst	Fri Apr 17 13:21:05 2009 +0200
+++ b/web/wdoc/tut_rql_fr.rst	Fri Apr 17 16:55:37 2009 +0200
@@ -134,9 +134,9 @@
 * `creation_date (Datetime)`, date de création de l'entité
 * `modification_date (Datetime)`, date de dernière modification de l'entité
 
-* `created_by (EUser)`, relation vers l'utilisateur ayant créé l'entité
+* `created_by (CWUser)`, relation vers l'utilisateur ayant créé l'entité
 
-* `owned_by (EUser)`, relation vers le où les utilisateurs considérés comme 
+* `owned_by (CWUser)`, relation vers le où les utilisateurs considérés comme 
   propriétaire de l'entité, par défaut le créateur de l'entité
 
 * `is (Eetype)`, relation spéciale permettant de spécifier le
@@ -144,7 +144,7 @@
 
 Enfin, le schéma standard d'un utilisateur est le suivant :
 
-:EUser:
+:CWUser:
   ::
 
 	login  	  (String, obligatoire)