Hello everyone,
I'm actually playing with directories and table references.
I have no problem with "basic" use of tableReference.
My problem is that i would like to add some additional information in the reference table.
Let's take an example with two directories : profile and function (the content of these directories doesn't really matter).
Let's check the contrib :
<directory name="profile">
<schema>profile</schema>
<table>profile</table>
[...]
<references>
<tableReference field="functions" directory="function"
table="profile2function" sourceColumn="profileId" targetColumn="functionId
schema="profile2function" dataFile="directories/profile2function.csv" />
</references>
</directory>
It works perfectly when i only need a mapping/reference table with [profileId, functionId].
But I would like to add an additional metadata in this mapping, let's say "status".
I tried to create a schema profile2function.xsd with profileId, functionId and status. I also added it to the required contribution.
Well, it seems that it doesn't work like I expected, because when i try to access the directory (in admin center, for example), I get an exception saying "column not found: status" while loading the csv file. (because i put the additional column in the csv file, of course)
So my question is : am I misunderstanding the meaning of schema in tableReference?
Maybe this schema field doesn't have this purpose, and we're not able to extend this mapping table?
/>
Or do you think i did a mistake somewhere?
If I take a look at the method getTable() of TableReference, i can see that we only add the sourceColumn and targetColumn here. We could maybe play with the extended schema in this method, to add the additional columns?
Maybe it would be easier to create our own extended mapping table, and handling manually the id references, but i don't like this approach.
Thank you.