在测试初期未使用dbref 进行数据保存,之后添加dbref和Include的使用,但原数据无法查询到,这个如何解决
Can you write in english? I'm from Brazil
"At the beginning of the test, data was not saved using dbref, and then the use of dbref and Include was added, but the original data could not be queried. How can this be solved?" - Google Translator
Yes, but i still not understand the real problem. Maybe he was using in wrong way. @happygb21, can you post an simple example to reproduce this error?
When inserting data, dbref is not used. Data is read by adding dbref, unable to query data.
@happygb21 is about this? https://github.com/mbdavid/LiteDB/issues/963
First, Read all old data using old BsonMapper(the one without dbRef)
Then, Save all the data using the new BsonMapper with DbRef
@happygb21 先用旧的mapper全部读出来,在用新的mapper存一遍。 new LiteDataBase(filePath, bsonMapper)
Most helpful comment
"At the beginning of the test, data was not saved using dbref, and then the use of dbref and Include was added, but the original data could not be queried. How can this be solved?" - Google Translator