...
Note | ||
---|---|---|
| ||
This type of entity class enable one-to-one model correspondence. For more complex needs, please refer to the complex entity section below. |
Info | ||
---|---|---|
| ||
When mapping sensible data it is important to maintain consistency, and some applications might have a complex structure (.i.e allowing multi currency, different time-zones etc...). A guide to Business Rules can be found Here |
FAQ
Expand | |||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| |||||||||||||||||||||
Let's imagine you are mapping people to contacts, and the have a reference to the organization (or company) they belong to. The first thing you need to do is to map the two reference fields:
Once that is done, the second and only thing you need to do is to declare that this field is a reference, so that the framework know it has something specific to do with it. That's done in a method in your entity class:
You can define as many references as you need. Note that you should always declare references using the Connec!™ name of the field.
If the entity you are mapping has nested sub-fields (e.g. an invoice can have an array of lines, a customer can have an array of notes, a warehouse can have an array of items etc...) you would need to declare them as well:
id_references does not prevent the entity to be pushed. |
...
Also don't forget that each entity your connector synchronize should be declared in the External class, and, because the synchronizable entities are stored in the local database for each organization, you'll need to create a migration for existing organization if you add an new entity after the release. (And only after the release. In development, just add the new entity to your organization synchronized_entities list with a rails console).
Business Rules FAQ
Expand | |||||
---|---|---|---|---|---|
| |||||
In each entity model, you can set metadata on each specific entity IdMap and specify which fields you do not want to be updated:
The specified fields will now be ignored in subsequent updates from your application. |
Triggering synchronizations
...