loopback-connector-mysql icon indicating copy to clipboard operation
loopback-connector-mysql copied to clipboard

Differentiating between database name & table_schema

Open aaqilniz opened this issue 1 year ago • 1 comments

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 avatar Aug 24 '24 16:08 aaqilniz

Hi, @dhmlau. Can you have a look?

aaqilniz avatar Aug 24 '24 16:08 aaqilniz