-
Notifications
You must be signed in to change notification settings - Fork 57
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Cannot use get or get_multi filter with like string #101
Comments
PR #85 will fix this, it's almost done |
While waiting for the resolution of the previous issue, I have another question regarding nested join query formats. I aim to retrieve a project and its nested objects based on client_id, department_id, and assignee_id as follows:
However, I encounter an issue: when a foreign key is null, the object is still returned but with all fields set to None.
How can I modify the query so that if a nested object's foreign key is null, the entire nested object is returned as None (e.g., 'client': None)? Thank you. |
This is a bug, I'll fix it! |
Closed by #85 |
Hello,
I'm currently utilizing FastCRUD with the FastAPI boilerplate, but I'm unsure how to implement a filter to retrieve a string from a field similar to the SQL 'LIKE' query, as shown below:
count_projects = await crud_projects.count(db=db, project_code=f"{short_code}%")
I need to count the projects whose project_code begins with a specific short_code (for example, "ABC"). Could you assist me in resolving this issue?
Thank you!
The text was updated successfully, but these errors were encountered: