@fadel1493  your are giving the id of the lecturer / TA to the hint which but your are not giving the hint itself to the lecturer/TA , u should remove the lines p.owner_id = current_teaching_assistant.id
                                                              p.owner_type = "teaching_assistant"
as those will be filled automatically when you do teaching_assistant.hints <= p