Parent Copy Rule Type

Parent Copy Rule Type
lac52
You can obtain parent values or reference parent data without cascade processing if the parent value is subsequently altered by defining Parent Copy derivation rules. API Creator derives parent role names from foreign key relationships.
Create a Parent Copy Rule
Prerequisite:
 Your API is connected to an active database that contains at least one table or view.
Follow these steps:
 
  1. In API Creator, in the Create section, click 
    Rules
    .
    If your API does not have existing rules, the Welcome to Rules page appears. If your API has existing rules, they are listed on the By entity tab by default.
  2. Click 
    Create a Rule
    .
  3. Select the 
    Parent Copy
     rule type, the entity to which it applies, and then click 
    Create Rule
    .
  4. Define the parameters of the rule:
    Title
     
    The title for the parent copy rule. The title for rules does not affect logic processing. To apply a default value, leave this field blank. 
    Required:
     No
    Entity/column
     
    The name of the parent entity and column representing the value to be copied into.
    Topics
     
    The topic associated with this rule.
    Parent attribute to copy
     
    The parent attribute whose value is copied into the child attribute when you associate the child to a parent.
    Layer7 Live API Creator
     copies the value to the child attribute only during a POST. It does not propagate changes you make to the parent attribute to the child attribute.
    Active
     
    Select this checkbox to activate the rule.
    Name
     
    The name of the parent copy rule. To apply a default value, leave this field blank.
  5. Click 
    Activate and Close
     to return to the list of rules.
The count rule is created.