LiteDB icon indicating copy to clipboard operation
LiteDB copied to clipboard

FIND - Beginner problems?

Open BuechnerA opened this issue 2 years ago • 1 comments

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!

BuechnerA avatar Sep 07 '22 11:09 BuechnerA

i doesn't seem to reproduce the problem image

pjy612 avatar Sep 14 '22 09:09 pjy612