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 }
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 }