Using the discoverSchema api on a postgres database has a couple of issues
relations: true does not work in the options object. You have to use associations: true instead
- association discovery only seems to work with belongsTo relations. The associated hasMany is not generated.
if my db has
Artist has a pk of ArtistID
Album has a fk of ArtistID
then I get
"relations": { "artist": { "model": "Artist", "type": "belongsTo", "foreignKey": "artistid" }
in my Album model, but
``relations: {}` in my Artist model
Using the discoverSchema api on a postgres database has a couple of issues
relations: truedoes not work in the options object. You have to useassociations: trueinsteadif my db has
Artist has a pk of ArtistID
Album has a fk of ArtistID
then I get
"relations": { "artist": { "model": "Artist", "type": "belongsTo", "foreignKey": "artistid" }in my Album model, but
``relations: {}` in my Artist model