none
Locate item metadata in a SqlMetadataStore RRS feed

  • Question

  • I have a functioning simple anchor provider, the identity field for the anchor provider is a guid. One of my conflict resolution scenairos needs to determine if the same item exists in a different replica. I  can open the SqlMetadataStore, and I have the guid of the item whoes sync identity I want to validate, but cant quite figure out how to use it to determine if the item exists in the replica as an active item.


    Robert G
    Monday, March 8, 2010 1:49 PM

Answers

  • In case anyone is interested, it appears that there is not explict way to search the metadata used by SimpleProviders. The field syntax is different and apparently conflicts with the syntax used when establishing custom fields. However you can use the SimplesyncServices class to reconstitue the entire metadata directory of objects through EnumerateAllLiveItems. Then you can build a temporary keyed collection to do lookups or other referential work.

    Robert G
    Tuesday, March 9, 2010 7:24 PM

All replies

  • how about ReplicaMetadata.FindItemMetadataByIndexedField ?
    Monday, March 8, 2010 3:49 PM
    Moderator
  • That would work if I knew how to establish a named indexed field in the replica metada, and how to set it to relate to the identity field used in the sync session.

    Robert G
    Monday, March 8, 2010 4:15 PM
  • In case anyone is interested, it appears that there is not explict way to search the metadata used by SimpleProviders. The field syntax is different and apparently conflicts with the syntax used when establishing custom fields. However you can use the SimplesyncServices class to reconstitue the entire metadata directory of objects through EnumerateAllLiveItems. Then you can build a temporary keyed collection to do lookups or other referential work.

    Robert G
    Tuesday, March 9, 2010 7:24 PM
  • Hi Robert Ginsburg,

    Looks like you found answer on your own :) I was going to suggest the same answer, but your second reply seemed to imply some other intention.

    I am glad you found the SimpleSyncServices class. The intention of the class is to perform operations on metadata store outside sync session, and possibly

    gain useful information such as enumerating through live items, etc...

    Patrick

    Tuesday, March 9, 2010 7:58 PM
  • Hi Patrick,
    SimpleSyncServices is useful for this situation, but I want to edit some field in the metadata.
    I cant find a method in SimpleSyncServices Class to perform this task.
    I use a FullEnumerationSimpleSyncProvider to synchronise two replica.
    Thanks,
    Thursday, March 18, 2010 1:30 PM
  • Thanks so much for this ... 5 years later!!!! I wasted most of the day trying to get this to work; documentation for this (abandoned?) framework is pretty scarce and a lot of it is for 1.0 where it looks like you could interchangeably use uint and string field references for accessing item metadata.
    Wednesday, May 13, 2015 5:44 AM