How to properly handle a hasMany-association for a document?

cancel
Showing results for 
Search instead for 
Did you mean: 
wuarmin
Active Member II

How to properly handle a hasMany-association for a document?

Hey,

I have following use-case: There are invoice-documents (PDF, TXT, XML) holding a hasMany-association to invoice-records.

An invoice-record consists of several properties. I.e. reference-number, amount, unit, status, etc... What is the best (right) way to map this use case with the current version of Alfresco?

Thanks

best regards

2 Replies
angelborroy
Alfresco Employee

Re: How to properly handle a hasMany-association for a document?

I guess the best approach is to use a "peer-peer association".

I've created a sample project to handle this kind of associations some time ago in https://github.com/angelborroy/alfresco-controls

 

Hyland Developer Evangelist
wuarmin
Active Member II

Re: How to properly handle a hasMany-association for a document?

Hey @angelborroy, thanks for your response. So you mean, I should create the main-invoice-document and associate it with one or more (hasMany) "dummy" invoice-records? (I don't actually have any files for the invoice records, but you mean I should create i.e. TXT-Files for them? I ask, because in Alfresco everything is a doc or a folder.)

What is the easiest way for me to try out your example project?

Thanks

best regards