Skip to content

Commit

Permalink
fix: tddl gives misleading information_schema.columns.table_name
Browse files Browse the repository at this point in the history
  • Loading branch information
cyjake committed Feb 28, 2022
1 parent 0c5e6bc commit a42c1fa
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/realm.js
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ async function loadModels(Spine, models, opts) {
const schemaInfo = await Spine.driver.querySchemaInfo(database, tables);

for (const model of models) {
const columns = schemaInfo[model.physicTable];
const columns = schemaInfo[model.physicTable] || schemaInfo[model.table];
if (!model.attributes) initAttributes(model, columns);
model.load(columns);
Spine.models[model.name] = model;
Expand Down

0 comments on commit a42c1fa

Please sign in to comment.