Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

  • A new Job instance is created
  • The instance is activated before the attributes and relations are set
  • The attribute Job.Name gets the value "Business Engineer"
  • The backwards relation is set with the active Person.

UI Text Box
type
Info

If a person can have multiple jobs, then the above service will work. By adding setting the Job.BelongsToPerson relation, the Person.HasJobs relation will be updated by adding the instance to the existing job instances.

Copy Job

Imagine a situation in which you want to create a new job instance and use current active job instance to retrieve values from. In this fictitious example we are using the active job instance to retrieve values from and set them on the newly created job instance. The service shown below will do all this within one service.

  • A new Job instance is created
  • The instance is activated after the attributes and relations are set, therefore we can retrieve values from the current active job instance.
  • The attribute Job.Name gets the value from the active job instance.
  • The backwards relation is set with the person from the active job instance.

...

Info

If the instance activation parameter is set to before. The newly created instance would be been activated before setting the attributes and relations. This would mean that the Name attribute and ofPerson relation would have been set to UNKNOWN, because the values would have been retrieved from the newly created job instance. Instead of the old active job instance.