Skip to main content

You are not logged in. Your edit will be placed in a queue until it is peer reviewed.

We welcome edits that make the post easier to understand and more valuable for readers. Because community members review edits, please try to make the post substantially better than how you found it, for example, by fixing grammar or adding additional resources and hyperlinks.

Required fields*

2
  • Maybe I should look into that more. As to why I want to do this--I have a drawing which can have a parts list. Any drawing can be used on a parts list for another drawing. On its own, a drawing can have parts 1, 2, and 3. If that drawing is part of another parts list, say at line 12, then I want it to show as 12, 12-1, 12-2, and 12-3. On another drawing, it might be on the parts list at line 15, so 15-1, 15-2, etc. I still want it to be saved in the database as items 1, 2, and 3, but shown as something else depending on the context. Commented Oct 31, 2018 at 17:15
  • Right, exactly. Separate your Problem Domain from your Persistence Domain. You don't want to modify information in the part because of how the drawing is using it, especially since every drawing would be using it differently. Check out some design patterns around this concept. I don't want to run off and start suggesting but definitely don't change the entity like that for that reason. Commented Oct 31, 2018 at 17:17