Closed davidradl closed 1 year ago
I suspect this is already fixed in snapshot versions of the connector going back as far as September, per https://github.com/odpi/egeria-connector-xtdb/issues/390 — just haven't done a release of the connector with it included yet 🙈
@cmgrote Is there a PR? The code is not showing in main. There is only a dummy implementation of the new classifyEntity method that is not performing the right behaviour
My apologies - the code is there - I was looking at the wrong version ...
No worries — here's the PR for reference: https://github.com/odpi/egeria-connector-xtdb/pull/400
The logic of these transaction functions is a bit confusing to follow, but broadly goes like this:
XtdbOMRSMetadataCollection
methods ultimately call a (Java) transaction function using the <function>.transact()
method..transact()
methods prepare all the inputs necessary for the (Clojure) transaction function to run and then invoke the Clojure transaction function (Transaction.builder().invokeFunction(...)
).
FN
string). Immediately after (fn [...
is where you'll see the arguments that the Clojure function requires — this is what the static .transact()
method is preparing and passing in step (3)..invokeFunction()
method actually passes over to XTDB to run the (injected at (1)) Clojure transaction function, passing through the arguments prepared.xtdbDoc
. (Or throw an Exception
if any error is found during the validations.)xtdbDoc
is then usually returned back to the Clojure code.I think this is now addressed — but if not, please re-open and let me know what I missed 🙈
As per https://github.com/odpi/egeria/issues/7153
Also the implementation of the new classifyEntity method the @cmgrote added to the XTDB repository connector is not correct. The purpose of these three new methods (and getHomeClassifications) is to allow a repository to store a classification independently of its entity using the entityProxy as a stub to connect it to. The repository needs to look to see if it has the entity and if so, it can use the old method to add/update/delete the classification. If the entity is not stored then it should add the entity proxy to the store with the classification. When the entity finally turns up in the repository via an event typically, the entity proxy is upgraded to an entity, with care that the home classifications are not lost.