-
-
Notifications
You must be signed in to change notification settings - Fork 874
Description
When acquiring a connection to Orient, function metadata is not populated.
For example:
ODatabaseDocumentTx odbTx = ...
OFunction function = odbTx.getMetadata().getFunctionLibrary().getFunction("functionName");
odbTx.getMetadata().getFunctionLibrary() does not have any functions even though the database has the functions and can be seen through the console or through studio. Even a server restart after function creation does not help, and the function metadata is not populated on connection creation after a server restart.
Note that subsequently calling odbTx.getMetadata().reload() correctly populates the metadata. However, we should not be required to call reload explicitly. The function metadata should be populated when acquiring the connection itself.
Note that the other metadata (indexes, schemas etc.) seem to be populated properly without having to call reload().
I'd also like to make a distinction in the case where the function was created after opening the connection (in which case it makes sense to call reload), but this issue involves opening the connection after the function has already been created.
P.S: Note that the missing function metadata does not prevent us from executing the function in a different way:
odbTx.command(new OCommandFunction("functionName")).execute();