Comments (1)
Hey Mark, thanks for using LiteDB. It's really nice to know.... 😄
LiteDB.ObjectId is almost the same class than MongoDB.Bson.ObjectId. To use MongoDB.Bson.ObjectId as you Id, just write a small custom serialize/deserialize functions to do this:
LiteDB.BsonMapper.Global.RegisterType<MongoDB.Bson.ObjectId>
(
(oid) => new LiteDB.ObjectId(oid.ToByteArray()),
(bson) => new MongoDB.Bson.ObjectId(bson.AsObjectId.ToByteArray())
);
from litedb.
Related Issues (20)
- [QUESTION] LiteDB almost works perfectly with Uno on WebAssembly but loses things on close HOT 1
- [BUG] LiteDB cant save an enum array of type 'byte' but type 'int' works
- [QUESTION] database doesn't persist between sessions HOT 2
- LiteDB ENSURE: ReadFull must read PAGE_SIZE bytes [0] HOT 1
- Page size must be index page HOT 1
- [QUESTION] Collection UpdateMany Example HOT 2
- [BUG] Arrays don't work when using custom constructors HOT 1
- [QUESTION] LiteDb persisting instance vs open/close
- [BUG] BsonCtor with parameters
- When is.net8 supported
- [QUESTION] Difficulty Querying with Composite Index
- [BUG] Unhandled exception when trying to open a shared conneciton in .net Framework 4.8 HOT 1
- Causes of memory increase in LiteDB usage 5.0.16 [BUG] HOT 3
- [QUESTION] Is there a way to determine whether DB rebuild is necessary? HOT 1
- [QUESTION] How can I open a connection in shared mode without using the Connection key in connection string
- [BUG] Not disposing when a collection is big like more than one million items
- [BUG] ILiteCollection<T>.Count() throws LiteDB ENSURE: request page must be less or equals lastest page in data file
- [QUESTION] Does it support .NET 8 ? HOT 1
- Error when trying to update from v4 to v5: Cannot insert duplicate key in unique index
- [BUG] LiteDB replaces unpaired surrogate pair to U+FFFD (REPLACEMENT CHARACTER)
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from litedb.