[Cubicweb] Correct use of the 'person' cube
aurelien.campeas at logilab.fr
Wed Jul 11 10:57:44 CEST 2012
Le 11/07/2012 08:42, Stéphane Bugat a écrit :
> Dear all,
> I want to use the 'person' cube so that each CWUser belonging to the 'users' group has a Person instance defined. For that I have decided to create an inlined relation definition between CWUser and Person (with a '11' cardinality).
> However, there are common attributes between both entities (first name, email, and so on).
> Just to make sure there is no other and simpler approach to deal with it:
> A solution is to define a hook for the creation of each CWUser that automatically creates the corresponding Person and predefines its attributes with the corresponding values of the CWUser attributes (using a 'after_add_entity' event).
> Is this correct?
More information about the Cubicweb