implement SelectOne and multiple

add Fixtures
This commit is contained in:
2019-06-04 13:28:38 +02:00
parent c5d4bfb07a
commit 81e46735df
5 changed files with 69 additions and 17 deletions

View File

@@ -0,0 +1,20 @@
create table if not exists test
(
id serial not null
constraint test_pk
primary key,
name text
);
create table if not exists test2
(
id serial not null,
title text,
test_id integer
constraint test2_test_id_fk
references test
);
INSERT INTO public.test (id, name) VALUES (1, 'plop');
INSERT INTO public.test2 (id, title, test_id) VALUES (1, 'plop', 1);
INSERT INTO public.test2 (id, title, test_id) VALUES (2, 'plip', 1);
INSERT INTO public.test2 (id, title, test_id) VALUES (3, 'ttt', null);