Displaying 2 results from an estimated 2 matches for "grouping_ids".
Did you mean:
grouping_id
2010 Feb 22
3
Multidimensional dynamic Hash
OK I give up, how do I do this...
I have a DB that stores dynamic variables with I group into
group_id''s. For instance here are a couple examples of db rows:
title="name", description = "john", grouping_id = "1"
title="location", description = "USA", grouping_id = "1"
title="comment", description = "hello",
2009 Oct 23
2
validates_uniqueness_of across multiple rows?
...in many elements which
are stored the Element model.
A set of elements is tied together by a grouping_id. An element can
be one of several types of objects. I''m doing this with polymorphic
associations.
I need a way to ensure that a grouping is unique. That is, there
should not be two grouping_ids containing the exact same elements.
The closest analogy I can think of is a composite primary key.
Except, this is across multiple rows (instead of columns) and uses
polymorphic association types and ids.
Can this be easily done with Rails and ActiveRecord?
Thanks,
Raj