diff -r 1b0dbcf4b214 -r 559cad62c786 req.py --- a/req.py Wed Oct 07 12:38:30 2009 +0200 +++ b/req.py Fri Oct 09 16:39:26 2009 +0200 @@ -108,7 +108,13 @@ # XXX move to CWEntityManager or even better as factory method (unclear # where yet...) def create_entity(self, etype, *args, **kwargs): - """add a new entity of the given type""" + """add a new entity of the given type + + Example (in a shell session): + + c = create_entity('Company', name='Logilab') + create_entity('Person', ('works_for', 'Y'), Y=c.eid, firstname='John', lastname='Doe') + """ rql = 'INSERT %s X' % etype relations = [] restrictions = []