3 Replies Latest reply on Jan 15, 2009 12:17 PM by adamw

    Will this scenario work?

    kaizersh

      Hi,

      Please let me know if the scenario below makes sense -

      I have a Client class containing a collection of ClientAddresses mapped as a OneToMany and ManyToOne relation. After persisting a record, say the revision no for both is 100. Now if I modify the Client details few times, rev no becomes 110. If only the address is modified a few times, the rev no is 105. Now when i query to retrieve the Client at version 105, I should get the address as it was at that revision, which could be say, 102 and not the latest address.

      Thanks.

      Regards
      Kaizer

        • 1. Re: Will this scenario work?
          adamw

          Hello,

          when you retrieve a client at revision X, and get the related address, it will also be read at revision X.

          --
          Adam

          • 2. Re: Will this scenario work?
            kaizersh

            Hi,

            But in this case the client and the addresses will have different revision numbers as both were modified independently. Therefore, there will be no mapping between a client at a revision no 110 and its corressponding address at that time which could be revision no 105. If currently my client rev no is 120 and address rev no is 115 and i query to get the client at rev no 110, I think I'd get the current address and not the one at 105.

            Thanks.

            Regards
            Kaizer

            • 3. Re: Will this scenario work?
              adamw

              Hello,

              the revisions are global, so it should work fine. Unless you have two separate databases ;)

              --
              Adam