I wrote in Italian because I thought the developer could read this. But after I thought that in english could be better for everyone. Sorry
Yes, moving the HIERARCHYPATH column before the LOCHIERARCHYs objects it works well. But before understand this I spend so much time looking for a way to let it works. So, thinking it is a bug, I decided to write about it.
My LOCATION.HIERARCHYPATH field is included in Non-Persistent Fields. If it wasn't I couldn't have done it neither moving the HIERARCHYPATH column? (I don't know because I don't know what that it means)
GEST S.p.A.
Original Message:
Sent: 09-28-2023 12:58
From: Matt McGuire
Subject: Bug MXLoader Adding elements
Hi Francesco,
I used Google Translate to read your message so I hope my understanding is correct.
Your load sheet looks like this:
- SITEID
- LOCATION
- LOCHIERARCHY.PARENT
- LOCHIERARCHY.SISTEMID
- HIERARCHYPATH
But it should look like this:
- SITEID
- LOCATION
- HIERARCHYPATH
- LOCHIERARCHY.PARENT
- LOCHIERARCHY.SISTEMID
I have found that MxLoader will not take parent object attributes if they're placed after child object attributes. If that doesn't work, confirm that HIERARCHYPATH is included on the Exclude/Include Fields dialog, as it is a Non-Persistent field.
------------------------------
Matt McGuire
Aquitas Solutions
https://www.aquitas-solutions.com/
Original Message:
Sent: 09-25-2023 13:04
From: Francesco Oliarca
Subject: Bug MXLoader Adding elements
Spero di poter parlare in italiano dato che anche lo sviluppatore lo è.
Ho notato un bug sul MXLoader. O almeno suppongo proprio lo sia…
Riguarda gli oggetti degli attributi che si vanno a caricare…
Provo a spiegare con un esempio:
Preparo una lista "AddChange" con "MXOPERLOC" (usato per caricare le Locations)
Uso i seguenti campi nel seguente ordine:
- SITEID
- LOCATION
- LOCHIERARCHY.PARENT
- LOCHIERARCHY.SISTEMID
- HIERARCHYPATH
HIERARCHYPATH non viene considerato…
Abilitando i log vedo il seguente codice:
<MXOPERLOCSet>
<LOCATIONS action="AddChange">
<SITEID>GEST</SITEID>
<LOCATION>TEST</LOCATION>
<LOCHIERARCHY>
<PARENT>PADRE</PARENT>
<SYSTEMID>SISTEMA</SYSTEMID>
<LOCATIONS>
<HIERARCHYPATH>ILLUMINAZIONE</HIERARCHYPATH>
</LOCATIONS>
</LOCHIERARCHY>
</LOCATIONS>
Ne deduco e verifico che quello che viene messo dopo i due oggetti "LOCHIERARCHY.", vengono inseriti nel solito oggetto ma in un sotto-oggetto "LOCATIONS"… mentre, credo che dovrebbe risalire di un livello di gerarchia con un "</LOCHIERARCHY>". Infatti, se la colonna HIERARCHYPATH la posiziono prima dei 2 campi "LOCHIERARCHY.", tutto funziona.
Mi sembra strano che questo problema sia passato inosservato. Sbaglio forse qualcosa io?
------------------------------
Francesco Oliarca
GEST S.p.A.
------------------------------