-
Notifications
You must be signed in to change notification settings - Fork 181
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
Properties with underscores in their name cannot be indexed #462
Comments
@ewrayjohnson, would you be interested to submit a PR? |
A workaround would be to specify a "valid" column name in the |
|
For those of us that have not taken the leap to LoopBack 4, the @Property decorator is not an option. Instead we would have to use postgresql.columnName |
Yes |
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions. |
Steps to reproduce
"index": true
)pg.autoupdate()
(e.g. whereapp.datasources.pg
);Current Behavior
Expected Behavior
Additional information
The bug shown here is a bad regular expression in migration.js (on or about line 777):
const propNameRegEx = new RegExp('^' + self.table(model) + '_([^_]+)_idx');
The simple fix is:
const propNameRegEx = new RegExp('^' + self.table(model) + '_(.*)(?:_idx)$');
The text was updated successfully, but these errors were encountered: