{"body":"use Red;\n\nmodel Comment {\n    has UInt $!id               is serial;\n    has Str  $.body             is column;\n}\n\nmodel Post {\n    has UInt $.id is serial;\n    has Str  $.title is unique;\n\n    has Int  $!comment-id is referencing{ :model<Comment>, :column<id> };\n    has      @.comments   is relationship( *.comment-id, :model<Comment> );\n}\n\nmodel Photo {\n    has UInt $.id is serial;\n    has Str  $.path is unique;\n\n    has Int  $!comment-id is referencing{ :model<Comment>, :column<id> };\n    has      @.comments   is relationship( *.comment-id, :model<Comment> );\n}\n\nred-defaults \"SQLite\";\n\nmy $*RED-DEBUG = True;\nschema(Comment, Post, Photo).create;\n\nmy $post = Post.^create: :title<bla>;\n$post.comments.append :body<blabla>;\n\nmy $photo = Photo.^create: :path<ble>;\n$photo.comments.append: :body<bleble>;\n","name":"","extension":"txt","url":"https://www.irccloud.com/pastebin/0NSSY3gQ","modified":1754596223,"id":"0NSSY3gQ","size":810,"lines":33,"own_paste":false,"theme":"","date":1754596223}