JDO
  1. JDO
  2. JDO-630

Support specification of exact class in SingleFieldIdentity

    Details

    • Type: Improvement Improvement
    • Status: Closed
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: JDO 3 (3.0)
    • Component/s: specification, tck
    • Labels:
      None

      Description

      When calling PersistenceManager.getObjectById() with a SingleFieldIdentity, there seems to be no way of avoiding the following
      (if the implementation decides to do so):
      "It is an implementation decision whether to access the data store, if required to determine the exact class. This will be the case of inheritance, where multiple <code>PersistenceCapable</code> classes share the same ObjectId class."

      Now when I know for sure that the targetClassName of the given SingleFieldIdentity already denotes the correct class for the given id, how can I avoid that additional roundtrip to the database for finding the exact class?

      It would be useful to have a way of specifying a SingleFieldIdentity to be for the exact class specified. This could be done by addition of methods
      void setExact(boolean flag);
      boolean getExact();
      to SingleFieldIdentity

      1. jdo-630.patch
        34 kB
        Craig L Russell

        Activity

        No work has yet been logged on this issue.

          People

          • Assignee:
            Unassigned
            Reporter:
            Andy Jefferson
          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development