# Pastebin MIQsH4OL $ for file in examples/blog/*; do echo "================= $file ================"; cat $file; done ================= examples/blog/index.p6 ================ unit package Test; require Post; say "OK" ================= examples/blog/Person.pm6 ================ use Red; require Person; model Person is rw { has Int $.id is serial; has Str $.name is column; has ::("Post") @.posts is relationship{ .author-id }; method active-posts { @!posts.grep: not *.deleted } } ================= examples/blog/Post.pm6 ================ use Red; require Post; model Post is rw { has Int $.id is serial; has Int $!author-id is referencing{ ::("Person").id }; has Str $.title is column{ :unique }; has Str $.body is column; has ::("Person") $.author is relationship{ .author-id }; has Bool $.deleted is column = False; method delete { $!deleted = True; self.^save } }