locked
Products and Sub-Products RRS feed

  • Question

  • In the model were people have products they order. My current program has patients who have medications.  My problem now is I have a product that needs to be able to add as many sub-products as are appropriate for each product. I can easily define sub-product details(properties table with SubProductName, Ranges, Result) and define the product as a set of details(a property table with ProductName, DateOrdered). The problem I have is when I order a product for a patient I need to have it also order new sets of details(property tables) for each sub-product I have saved and defined for the product. This will allow me to define new products with various number sets of sub-product details giving it the room for growth as new products in this case labs are developed. I don’t know how to define this with relationships though so lightswitch will understand what I am creating.

    The only solution I have come up with so far is trying to make a single entity and trying to guess the maximum number of subproduct details to define but this leaves me with a lot of other problems. Problems like null data and limited numbers of sub products that can be defined for future products.

    Wednesday, December 17, 2014 11:46 PM

All replies

  • The only solution I have come up with so far is trying to make a single entity and trying to guess the maximum number of subproduct details to define but this leaves me with a lot of other problems. Problems like null data and limited numbers of sub products that can be defined for future products.

    As you said, in this situation, I usually set big "maximum" value.
    Monday, December 29, 2014 9:13 AM