loopbackio / loopback-connector-mysql

Loopback Connector for MySQL
Other
125 stars 183 forks source link

Differentiating between database name & table_schema #606

Open aaqilniz opened 3 months ago

aaqilniz commented 3 months ago

Hi.

While discovering models, if no schema is provided (and the all flag is false), the connector fetches the tables/models that belong to the logged-in user at MySQL DB. Link to the line.

If we look at MySQL docs, the database name is supposed to be synonymous with table_schema. Hence, fetching all tables doesn't make sense if no schema is provided. It should take the DB name as a schema.

aaqilniz commented 3 months ago

Hi, @dhmlau. Can you have a look?