cancel
Showing results for 
Search instead for 
Did you mean: 

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

wuarmin
Confirmed Champ
Confirmed Champ

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 2

angelborroy
Community Manager Community Manager
Community Manager

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

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