How to get list of Nodes

How can we get the list of currently RegisteredNodes?


Manager := TObjectManager.Create(TFireDacSQLiteConnection.CreateConnection);
echoNodes :=  Manager.Find<TEchoNode>.List;

  MemoRegisteredList.ClearContent;
  for echoNode in echoNodes do
  begin
    MemoRegisteredList.Lines.Add(echoNode.Name);
  end;

I get an exception: EInvalidEntity with message 'Class TEchoNode is not a valid Entity. [Entity] attribute missing.'

Perhaps the TMS Echo team can look into added the following to allow for easier Node management:
- GetRegisteredNodes
- DeregisterNode<NodeID>

Thanks!

That's the correct way, you can use that code to retrieve nodes, and also use the manager do "Deregister" node (by setting TEchoNode.Status property to Disabled and saving the node).


The error you get is probably because the TEchoNode class is not mapped in the specific TMappingExplorer you are using for the manager. Try creating the manager like this:

Manager := TObjectManager.create(Connection, TMappingExplorer.Get(EchoModelName))