M
mark.oliveira
Hi,
I was hoping somebody can help me with a design question. I have read
in numerous places that business objects should not even know that a
database exists let alone know about how the object itself is
represented in the database. My question is, how do you keep track of,
say, properties that are stored in the database as key/value pairs?
The object cares only about the value but the key is also necessary for
when u want to store the data. For example let's say I have a shape
table and one of the columns is color_id. Then assume there is a color
table with id and name as columns. How do I avoid having a "shape"
business object with both properties, colorId and colorName? Is
including the id considered "bad design"? Any insight would be much
appreciated.
Thanks!
Mark
I was hoping somebody can help me with a design question. I have read
in numerous places that business objects should not even know that a
database exists let alone know about how the object itself is
represented in the database. My question is, how do you keep track of,
say, properties that are stored in the database as key/value pairs?
The object cares only about the value but the key is also necessary for
when u want to store the data. For example let's say I have a shape
table and one of the columns is color_id. Then assume there is a color
table with id and name as columns. How do I avoid having a "shape"
business object with both properties, colorId and colorName? Is
including the id considered "bad design"? Any insight would be much
appreciated.
Thanks!
Mark