Describe the bug
When using a plain QueryBuilder the .find(), .find_or_fail() and .find_or_404() will throw an AttributeError
the error is AttributeError: 'NoneType' object has no attribute 'get_primary_key'
To Reproduce
builder = QueryBuilder()
try:
record = builder.find(100)
record = builder.find_or_fail(100)
record = builder.find_or_404(100)
except ModelNotFound as e:
print("model not found")
``
**Expected behavior**
when using a plainQueryBuilder without a model, the methods should either:
return the found recod
or
raise a `ModelNotFound` exception if the record is not found
**Screenshots or code snippets**.
NA
**Desktop (please complete the following information):**
- OS: MacOS
- Version 12.7
**What database are you using?**
- Type: all
- Version NA
- Masonite ORM 2.24.0
**Additional context**
NA
Describe the bug
When using a plain QueryBuilder the
.find(),.find_or_fail()and.find_or_404()will throw anAttributeErrorthe error is
AttributeError: 'NoneType' object has no attribute 'get_primary_key'To Reproduce