[ https://issues.apache.org/jira/browse/OFBIZ-4709?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13217004#comment-13217004 ]
Anne Jessel commented on OFBIZ-4709: ------------------------------------ Thanks all for the excellent feedback. Like many of you, I also like to have little data in the entities, and most in Jackrabbit. I would prefer to ignore the existing DataResource for this. I don't like storing a document's expiry date as from/thruDate in ProductContent, because one document could be associated with multiple Product, Party, ShipmentItem etc entity values. The same from/thruDate would have to be copied to all of these. To me, the from/thru in something like a ProductContent entity states when the association between the content and the product is valid, not when the content itself is valid. The difference doesn't really matter if a specific content is always related to only one product. If Jackrabbit can efficiently and easily support searches such as "all documents of a certain type that have not expired" then I'd prefer to put the expiry date in Jackrabbit. But if the OOTB entity system does a better job (as I suspect), then I'd rather expiry be in an entity. Anyone know which is more efficient? I think Jacopo misunderstood what I said about contentTypeId having values such as ANNOTATION. I don't wish to add those. That is what is there now. I was trying to say that I think the existing use of contentTypeId is not compatible with indicating whether content is stored in JCR or Entity, therefore I suggest we add a new field for that purpose, namely storageTypeId. Adrian asked whether there is a design document somewhere. No there isn't (except my scratches on paper). Do you think I should add a page on the wiki or something? I don't mind where we discuss this: I started on the ML, and was advised to move it to Jira, but maybe it has evolved such that Jira is no longer appropriate. It is time I did a summary of my understanding of the current consensus anyway, so let me know where you all would prefer me to put it. > Support jcr-stored file content within Applications > --------------------------------------------------- > > Key: OFBIZ-4709 > URL: https://issues.apache.org/jira/browse/OFBIZ-4709 > Project: OFBiz > Issue Type: Sub-task > Components: ALL APPLICATIONS > Affects Versions: SVN trunk > Reporter: Anne Jessel > Assignee: Sascha Rodekamp > > My current requirements: > * store uploaded documents (pdf and scans), mainly for legal compliance > reasons > * old document versions should be accessible > * documents should be associated with existing entities. So far I've > identified a need to associate with Product, Party, OrderHeader, > ShipmentItem, probably InventoryItemDetail and maybe WorkEffort. I would not > be surprised if we discover more as this project proceeds. > * documents may have a type and a purpose, though sometimes I'm not sure of > the difference. For example, type: drivers_licence might be purpose: > identification, and/or purpose: permission_to_drive, while type: > shipping_label would be purpose: shipping_label > * many documents have an expiry date (e.g. drivers licence) > * a document may become invalid before its expiry date (e.g. because the law > changed) > * a specific version of a document may need to be associated with an entity. > For example, a licence agreement document accessed via a Product should > always be the latest version. However the version of that document actually > shipped with the product should be associated with the ShipmentItem. > * a single document might be associated with more than one entity type: see > the example in the previous point > Not all documents require all of the above. For example, there are some > documents where we don't need to track which version was used when, and some > without expiry dates. > I'm thinking of using the from/thruDate pattern to handle expiry related > needs. I'd like to put as much information into the jcr path as possible, so > less needs to go into entities, as per Sascha's suggestion on the dev ML. > However (at least) from/thruDate and which version of a document was actually > used where will presumably need to be stored in an entity. -- This message is automatically generated by JIRA. If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa For more information on JIRA, see: http://www.atlassian.com/software/jira