{"body":"use lib 'lib';\n\nuse Red;\n\nmy $*RED-DB = database \"SQLite\";\n\nmodel M2 { ... }\n\nmodel M1 {\n    has Int $.id is serial;\n    has Str $.name is column;\n    has M2 @.m2 is relationship{ M2.m1_id };\n}\n\nmodel M2 {\n    has Int $.m1_id is id;\n    has Int $.id is id;\n}\n\nM1.^create-table;\nM2.^create-table;\n\nmy $r = M1.^create: :name<a>;\n\nfor 0 .. 5 -> $id {\n    my $x = M2.^create: :m1_id($r.id), :$id;\n    $x.perl.say;\n}\n\n$r.perl.say;\n\nM2.^all.elems.perl.say;;\n\n$r.m2.perl.say;","name":"","extension":"txt","url":"https://www.irccloud.com/pastebin/JY6hC3p0","modified":1572118063,"id":"JY6hC3p0","size":468,"lines":34,"own_paste":false,"theme":"","date":1572118063}