Hi,
in my program I have 2 kinds of orderlines. TypeA and TypeB. They have a lot of things in common, but also a few different properties and rules. They are stored in the same table, where some fields have value NULL because those are used by the other type.
In this table I have a PK of two columns, ProjectID and TaskID. For each task there can be one order with multiple orderlines, which can be of both types.
Each orderline will have a line number. When I store the orderlines in the table, I want to insert the TypeA lines first, starting from 1 till how many there are, for example 8.
After that I want to insert the TypeB lines, which have to start with 9 till how many there are.
I have to do this, because of the orders that have to be created and synchronized with some other tables at some point.
This actually mean I should have 2 entities and probably an OrderManager to make sure the orderlines are inserted correctly, but how do I do this? What is the best way to implement this ?
Gr.,
G.I.