mbdavid / LiteDB

LiteDB - A .NET NoSQL Document Store in a single data file
http://www.litedb.org
MIT License
8.62k stars 1.25k forks source link

FIND - Beginner problems? #2233

Open BuechnerA opened 2 years ago

BuechnerA commented 2 years ago

Private m_MouldDatabase As LiteDB.LiteDatabase Private m_Moulds As LiteDB.LiteCollection(Of Mould) m_MouldDatabase = New LiteDB.LiteDatabase(IO.Path.Combine(DataPath, "xxx.db")) m_Moulds = m_MouldDatabase.GetCollection(Of Mould)("Moulds")

This query (Find).... : Dim Result = m_Moulds.Find(Function(y) y.Name.StartsWith("F")).ToArray

....works fine until there is an entry (mould) with a name that starts with "F" :-( Then I get an "Object has not been set to an instance".

If there is no entry starting with "F", I get an empty list (LiteDB.LiteCollection(Of Mould)).

What am I misunderstanding here (I assume the probelm is on my side)? Thank you very much for feedback!

pjy612 commented 2 years ago

i doesn't seem to reproduce the problem image