Following Loobback Docs: Discovering models from relational databases, Stackoverflow answer: Loopback not discovering models and Loopback datasource juggler API: Datasource I created a discover js script to get models from an oracle database. The problem is that it never managed to read the relations from the tables. I used the methods
- discoverAndBuildModels - The result object had the properties of the table and an array called relations but that array was empty
- discoverSchema - I managed to get the actual model JSON file and write it to the appropriate location. As the method is described in the api to not read relations i was not surprised to not find any here
- discoverSchemas - Includes option to read relations (called relations but also tried it with associations) which gave me a similar result than discoverSchema but the "relations" tag only had an empty json object assigned to it.
I tried all options with a variety of relations and associations settings but none of them gave me anything but an empty object as the "relations" tag.
Am I missing something in the setup?