I think my question is best described as an example. Let's say I have a simple model called “Thing”, and it has several attributes that are simple data types. Sort of...
Thing
- foo:string
- goo:string
- bar:int
This is not difficult. The db table will contain three columns with these three attributes, and I can access them with something like @ thing.foo or @ thing.bar.
But the problem I'm trying to solve is what happens when "foo" or "goo" can no longer be contained in a simple data type? Suppose foo and goo represent the same type of object. That is, they are both instances of "Whazit" with only different data. So now, Thing might look like this ...
Thing
- bar:int
"Whazit", :
Whazit
- content:string
- value:int
- thing_id:int
. . @thing, 2 Whazit ( "-" , Thing 2 Whazits)? , , Whazit foo goo. , @thing.foo , .
"name" Whazit, Whatzits, @thing, Whazit, . , .
?