I have a situation where the model in the database does not match the model in the API. Specifically, my products' API contains contract price, which is in a separate table, and that table has price specific to each customer/product combination.
Outside of StrongLoop, I would typically solve this with custom/native SQL, but I read in the documentation that such is ill advised in StrongLoop. I have other situations like this where the database model does not efficiently represent the API model, typically due to legacy data definitions in the databases.
- Should I go down the path of custom/native SQL anyway?
- If so, are there examples and/or best practices I should follow?
- If not, what other ways should I solve the problem?