Extending opelmis core domain model

@Sebastian_Brudzinski , @Klaudia_Palkowska , hello all. I have done some reading on use cases for extending openlmis from this link Confluence. I find Use Case 3 (Project extends a core domain model) to be relevant with the task i’m working on. I need to add a new field to the Order domain class to be able to include that field on the csv generated when a requisition is converted to order. My questions;

  1. Is there more documentation i can find on this type of extension point?
  2. Is the domain model extension practical in openlmis currently?


The domain modal can be extended using the ExtraData approach, which is briefly documented here: Confluence

You can see it in action based on the Facility entity in referencedata: openlmis-referencedata/Facility.java at master · OpenLMIS/openlmis-referencedata · GitHub

If you ever need the core code to support additional data for the core entity, you can check how the Facility search was modified to support the extra data: openlmis-referencedata/FacilityService.java at master · OpenLMIS/openlmis-referencedata · GitHub

Best regards,

Well narrated @Sebastian_Brudzinski, I should be able to solve my problem with the extradata json approach. By adding an extraData column to the Order entity class, I should be able to add arbitrary attributes which I can then export to csv when a requisition is converted to an order (https://openlmis.atlassian.net/browse/TZUP-170).