Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

LB4 discover Error after updating libraries to latest #748

Open
ingpconci opened this issue Feb 21, 2025 · 1 comment
Open

LB4 discover Error after updating libraries to latest #748

ingpconci opened this issue Feb 21, 2025 · 1 comment
Labels

Comments

@ingpconci
Copy link

Steps to reproduce

Updating loopback libraries

"@loopback/authentication": "^11.0.11", "@loopback/authentication-jwt": "^0.15.11", "@loopback/authorization": "^0.15.11", "@loopback/boot": "^7.0.11", "@loopback/context": "^7.0.11", "@loopback/core": "^6.1.8", "@loopback/openapi-v3": "^10.0.11", "@loopback/repository": "^7.0.11", "@loopback/rest": "^14.0.11", "@loopback/rest-explorer": "^7.0.11", "@loopback/service-proxy": "^7.0.11", "loopback-connector-rest": "^5.0.1",
and PostgreSQL connector
"loopback-connector-postgresql": "^7.1.10",

Current Behavior

The tool
lb4 discover --datasource db --schema appuser

failed with the Error:

Error: buildQueryUniqueKeys must be implemented by the connector at SQLConnector.buildQueryUniqueKeys (C:\Users\Paolo Conci\Documents\PROJECTS_LOCAL_WORKSPACE\L_FBK_MNFLims\APP_SERVER\fbk-fablims-server\node_modules\loopback-connector\lib\sql.js:2159:9) at SQLConnector.discoverUniqueKeys (C:\Users\Paolo Conci\Documents\PROJECTS_LOCAL_WORKSPACE\L_FBK_MNFLims\APP_SERVER\fbk-fablims-server\node_modules\loopback-connector\lib\sql.js:2180:20) at DataSource.discoverUniqueKeys (C:\Users\Paolo Conci\Documents\PROJECTS_LOCAL_WORKSPACE\L_FBK_MNFLims\APP_SERVER\fbk-fablims-server\node_modules\loopback-datasource-juggler\lib\datasource.js:1346:20)

Expected Behavior

With the previous libraries
"@loopback/authentication": "^11.0.8", "@loopback/authentication-jwt": "^0.15.8", "@loopback/authorization": "^0.15.8", "@loopback/boot": "^7.0.8", "@loopback/core": "^6.1.5", "@loopback/repository": "^7.0.8", "@loopback/rest": "^14.0.8", "@loopback/rest-explorer": "^7.0.8", "@loopback/service-proxy": "^7.0.8", "debug": "^4.3.7", "file-type": "^16.0.0", "jsonwebtoken": "^9.0.0", "loopback-connector-postgresql": "^7.1.5",
the tool extracts the DB information from Postgresql

lb4 discover --datasource db --schema appuser ? Select the models which to discover userTodo ? Select a convention to convert db column names(EXAMPLE_COLUMN) to model property names: (Use arrow keys) ? Select a convention to convert db column names(EXAMPLE_COLUMN) to model property names: Camel case (exampleColumn) (Recommended) create src\models\user-todo.model.ts

Link to reproduction sandbox

Additional information

Related Issues

See Reporting Issues for more tips on writing good issues

@ingpconci ingpconci added the bug label Feb 21, 2025
@dhmlau
Copy link
Member

dhmlau commented Feb 21, 2025

@ingpconci, thanks for reporting this. It's currently being worked on via #743 (cc @aaqilniz ).
For now, could you please try to downgrade the loopback-connector to 6.1.12? This feature was introduced in 6.2.0, however, it's missed that there's code change needed for this connector. Thanks.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants