0
vijay.nallala created
- ABP Framework version: 4.3.0
- UI type: MVC
- DB provider: MongoDB
- Tiered (MVC) or Identity Server Separated (Angular): no
- Exception message and stack trace: N/A.. due our exisitng model has object format.
- Steps to reproduce the issue: we need set guid in MongoDB for all entities as ObjectId. but in this ABP considering as BindData.. Can you please suggest on this
Actual : "_id" : BinData(3, "l81YjCmHgqJGQjn8TFkFwA==") Expectation : "_id" : ObjectId("5f18b4b647b1cdcaf667fa2c")
2 Answer(s)
-
0
Hi @vijay.nallala
Guid
cannot be converted toObjectId
because they are two different things(different sizes, algoritms).(https://stackoverflow.com/a/5514441/7200126)
So, you can't change existing Entity ids to ObjectId. You can manage only your entities and your new entities can has ObjectId as Id.
-
0
This question has been automatically marked as stale because it has not had recent activity.