Skip to content
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

Can't request deleted_at value if not selected #418

Open
netosts opened this issue Oct 19, 2023 · 0 comments
Open

Can't request deleted_at value if not selected #418

netosts opened this issue Oct 19, 2023 · 0 comments

Comments

@netosts
Copy link

netosts commented Oct 19, 2023

This is my first time writing a issue here, sorry for my mistakes (if i do any).

I'm trying to request values from database, including the deleted_at. The problem is, even if deleted_at has value, i get "deleted_at": null as return. If i use select(), the deleted_at return with value.

This is the code to get every value (not using select):
student = di["db"].table('persons as p') \ .join('students as s', 'p.id', '=', 's.person_id') \ .where('p.id', person_id) \ .join('weights as w', 'p.id', '=', 'w.person_id') \ .where('w.created_at', newest_weight) \ .first()

then i make a request to a data where it has deleted_at value, but this is what returns:
{ "id": 24, "name": "Test Zero", "cpf": "68867005022", "gender": "Male", "role": "Student", "email": "sadf@adfg.com", "phone_number": "97123792317", "birth_date": "1999-06-28", "height": 170, "shirt_size": "XG", "shorts_size": "PP-36/38", "address_picture": null, "created_at": "2023-10-18T22:46:15.568000", "updated_at": "2023-10-19T22:00:01.727332", "deleted_at": null, "person_id": 27, "personal_id": 1, "neuromuscular_protocol": null, "antropometria_protocol": null, "cardio_protocol": null, "weight": 70 }

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant