Many to Many Collections
From: Gary Cohan (spam_at_hotmail.com)
Date: 10/31/03
- Next message: Shripathi Kamath: "Re: Many to Many Collections"
- Previous message: Gordon Beaton: "Re: Socket question"
- Next in thread: Shripathi Kamath: "Re: Many to Many Collections"
- Reply: Shripathi Kamath: "Re: Many to Many Collections"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Date: Fri, 31 Oct 2003 18:18:51 -0000
Lets say you have two classes,
Product
and
Category.
In my e-commerce application, each category can have multiple products, and
each product and be on multiple categories.
So obviously, each Product has a collection of Category objects, and each
Category has a collection of Product objects.
My question is, if you wanted to add a product to a category and thus have a
new category <--> product mapping, would you expect to add the product to
the category, and then add the category to the product as two seperate
method calls, or is there some commonly used collection idiom that takes
care of this ?
- Next message: Shripathi Kamath: "Re: Many to Many Collections"
- Previous message: Gordon Beaton: "Re: Socket question"
- Next in thread: Shripathi Kamath: "Re: Many to Many Collections"
- Reply: Shripathi Kamath: "Re: Many to Many Collections"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Relevant Pages
|