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

String should saved as objectId #515

Closed
imonildoshi opened this issue May 6, 2019 · 3 comments
Closed

String should saved as objectId #515

imonildoshi opened this issue May 6, 2019 · 3 comments
Assignees

Comments

@imonildoshi
Copy link

While finding a String which is actually an objectId, loopback-connector-mongodb converts it to ObjectId and then finds, which is perfect.

But while inserting, if a string is a foreign key and not an Id, it is not converted to ObjectId

What do you recommend? should we convert all the properties of regex /^[0-9a-fA-F]{24}$/ to objectId and then save

@dhmlau
Copy link
Member

dhmlau commented May 6, 2019

@imonildoshi , saw your same question posted in loopbackio/loopback-next#2085 (comment). Should we use that thread to continue to discussion? Thanks.

@dhmlau dhmlau self-assigned this May 6, 2019
@imonildoshi
Copy link
Author

Yes sure, let's do that

@dhmlau
Copy link
Member

dhmlau commented May 7, 2019

ok. let me close this issue then. Thanks.

@dhmlau dhmlau closed this as completed May 7, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants