Advertisement
Xliff

Untitled

Mar 15th, 2019
1,245
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. Collection AB {
  2.   model B is table<bbb> { ... }
  3.   model A is table<aaa> { has UInt $.id is serial; has B @.bs is relationship{ .a-id } }
  4.   model B { has UInt $.id is serial; has UInt $.a-id is referencing{ A.id }; has A $.a is relationship{ .a-id } }
  5.  
  6.   has A $.a;
  7.   has B $.b;
  8. }
  9.  
  10. ----------------------
  11. # If multiple files.
  12.  
  13. use Model1;
  14. use Model2;
  15. use Model3;
  16.  
  17. Collection AB {
  18.   has Model1 $.model1;
  19.   has Model2 $.model2;
  20.   has Model3 $.model3;
  21. }
Advertisement
RAW Paste Data Copied
Advertisement