Closed Sirick93 closed 6 months ago
find()
requires to return an item so you are sure, you get one at all circumstances. It should be also used for single items only, not in a loop because this is slow and ineffective. In that case, use search()
instead to retrieve all items you are looking for at once and loop over them afterwards.
Why would a find method throw an exception if a record wasn't found and not return null? I think this should be changed. We are forced to make a try catch block instead of a simple if statement.