common/test/data/entities.py
author sylvain.thenault@logilab.fr
Mon, 06 Apr 2009 16:18:46 +0200
changeset 1251 af40e615dc89
parent 0 b97547f5f1fa
permissions -rw-r--r--
introduce a 'cw_' prefix on entity table and column names so we don't conflict with sql or DBMS specific keywords

from cubicweb.entities import AnyEntity, fetch_config

class Personne(AnyEntity):
    """customized class forne Person entities"""
    id = 'Personne'
    fetch_attrs, fetch_order = fetch_config(['nom', 'prenom'])
    rest_attr = 'nom'


class Societe(AnyEntity):
    id = 'Societe'
    fetch_attrs = ('nom',)
    
class AnotherNote(AnyEntity):
    id = 'AnotherNote'