From 022101ae3c8b23760c107b23a5a6b21d0c575a4b Mon Sep 17 00:00:00 2001 From: mdr1384 <32360633+mdr1384@users.noreply.github.com> Date: Thu, 15 Sep 2022 09:32:24 -0400 Subject: [PATCH] Fix example code in computed relationships Looks like a copy-paste error - the `films.id` column should be associated with the `premieres.film_id` column. --- docs/api.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/api.rst b/docs/api.rst index bc95ea337..89a48524c 100644 --- a/docs/api.rst +++ b/docs/api.rst @@ -1129,7 +1129,7 @@ Now let's define the opposite one-to-many relationship with another function. .. code-block:: postgres create function premieres(films) returns setof premieres as $$ - select * from premieres where film_id = $1.director_id + select * from premieres where film_id = $1.id $$ stable language sql; Similarly, this function defines a relationship between the parameter ``films`` and the return type ``premieres``.