SELECT "answer"."id", "answer"."body", "answer"."plain_text_body", "answer"."type_id", "answer"."user_id", "answer"."created_at", "answer"."parent_id", "user"."id" AS "user__id", "user"."first_name" AS "user__first_name", "user"."last_name" AS "user__last_name", "user"."username" AS "user__username", "user"."email" AS "user__email", "user"."phone" AS "user__phone", "user"."password" AS "user__password", "user"."created_at" AS "user__created_at" FROM "posts" AS "answer" LEFT JOIN "users" AS "user" ON ("user"."id" = "answer"."user_id") JOIN post_types AS pt ON (pt.slug = 'answer') WHERE (answer.parent_id = 7) AND (answer.deleted_at IS NULL) ORDER BY "answer"."created_at" DESC
There is no SQL generated from the relation Replies, it just completely ignores it resulting in the following output:
These are the models:
This is the execution code:
This code results in the following SQL:
There is no SQL generated from the relation
Replies
, it just completely ignores it resulting in the following output:where replies are always null while there should be the data from the database.