I'm coding a site that's using tags. Two other classes (Foo and Bar) both will use tags, but the tags used in Foo won't apply to Bar, and vice-versa. So I created the Tags table with both foo_id and bar_id columns, so when a record is saved, the foreign key for the correct object-type can be added.
Will this cause problems? Is there a more elegant way to store Tags?