Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add concept of foreign key translation #13

Open
DominicWatson opened this issue Jul 22, 2019 · 0 comments
Open

Add concept of foreign key translation #13

DominicWatson opened this issue Jul 22, 2019 · 0 comments

Comments

@DominicWatson
Copy link
Contributor

DominicWatson commented Jul 22, 2019

i.e. there is an external system, with its own IDs, it would be awesome if the API handled translating those IDs into and from Preside PKs when pushing and pulling data from the API. Configuration could be like:

/**
 * some_object.cfc
 * 
 * @dataApiExternalIdField external_id;
 */
component {
    property name="external_id" type="numeric" uniqueindexes="externalId" required=false;
}

Then, in an object that references the above:

/**
 * another_object.cfc
 * 
 */
component {
    property name="some_object" relationship="many-to-one" relatedto="some_object" required=true dataApiTranslateFk=true;
}

API calls by the external system would then need only use their own key values for the relationship object and would only receive those keys in return.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant