Created
March 18, 2015 16:18
-
-
Save simong/8f05c19d4603e7f02690 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| // 3 model definitions | |
| Furniture = define(...) | |
| Wood = define(...) | |
| Country = define(...) | |
| // A 3-way join table between furniture and wood and country | |
| FurnitureWood = define(); | |
| Furniture.hasMany(FurnitureeWood); | |
| Wood.hasMany(FurnitureWood); | |
| FurnitureWood.belongsTo(Furniture); | |
| FurnitureWood.belongsTo(Wood); | |
| FurnitureWood.belongsTo(Country) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment