[Deprecated] DMZ 1.6.2 (DataMapper OverZealous Edition) |
[eluser]OverZealous[/eluser]
@hidechron I'm not sure what you want, but there's two possible answers: If you only want one copy of each game per user, but want to assign different categories based on the user: You can use Join Fields to store the category on the join itself. For example, add a category_id column to the join table, then you can include use column in your queries. It's not very elegant. If you are trying to allow a user to have several copies of the same game stored in different categories: DMZ only supports one relationship between two objects. The solution is to create an interim model that handles the more complex connections: Quote:User has many User_categories User_category is simply an object to handle the connection. Then you can use Deep Relationships to build your query, like so: Code: // list games for this user and category It can be a more complicated issue when adding and removing connections: Code: // removing examples. Adding is similar Well, that became much more extensive than I had originally planned. |
Welcome Guest, Not a member yet? Register Sign In |