[Cubicweb] nested relation / hook validation
carlos.balderas at gmail.com
Tue Jan 25 07:29:53 CET 2011
I am trying to make a hook validation but I can figure out how this can be
Here the explanation of the schema
* *ProcessRole* is a composite entity of *Process*.
* *ProcessRole* has a relation to *JobTitle* relation.
I want to validate that a *ProcessRole* shouldn't be added to a *Process*,
if the *JobTitle* already exists in other *ProcessRole* in the same *Process
Process = Certification One
which has a :
ProcessRole = Validator
JobTitle = Human R. 1
Then, I don't want any other ProcessRole to be added with the JobTitle =
Human R.1 to Certification One Process.
I tried to make this validation in the event "before/after" add relation at
the moment to add JobTitle to ProcessRole and what I found at this moment I
could not rich the Process (empty relation) entity which ProcessRole will be
I also tried to make the validation in the event "before/after" add relation
at the moment to add ProcessRole to Process, but at this moment I could not
rich the JobTitle (empty relation) entity to validate if this JobTitle
exists already related to the Process.
I hope I explained myself well.
Any comment or help will be very appreciated.
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the Cubicweb