Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Collection AB {
- model B is table<bbb> { ... }
- model A is table<aaa> { has UInt $.id is serial; has B @.bs is relationship{ .a-id } }
- model B { has UInt $.id is serial; has UInt $.a-id is referencing{ A.id }; has A $.a is relationship{ .a-id } }
- has A $.a;
- has B $.b;
- }
- ----------------------
- # If multiple files.
- use Model1;
- use Model2;
- use Model3;
- Collection AB {
- has Model1 $.model1;
- has Model2 $.model2;
- has Model3 $.model3;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement