I fail to see how this is difficult to do in SQL. Maybe I don't understand what you try to achieve but this would be my approach:
Tables:
Users (userid, username)
FavoriteColors (userid, colorname)
Add color:
INSERT INTO FavoriteColors VALUES (123, 'green')
Remove color:
DELETE FROM FavoriteColors WHERE userid=123 AND colorname='green'
Get all colors:
SELECT colorname FROM FavoriteColors WHERE userid=123
Objects:
User (userid, ..., favoritecolors (a list))
the O/R mapping is straight forward: A list of something inside an object -> a table of something with the primary key of the object as a foreign key.
Doesn't look to difficult for me.
Soooo... why reinvent the wheel if the database is doing the same thing? ;-)



Reply With Quote
