Sophie

Sophie

distrib > Fedora > 15 > i386 > by-pkgid > 864d1c3c3cd8df4e3a2692faf8776e05 > files > 501

db4o-doc-7.4-2.fc13.i686.rpm

<html>
  <head>
    <META http-equiv="Content-Type" content="text/html; charset=utf-8">
    <title>Internal IDs</title>
    <link rel="stylesheet" type="text/css" href="../../../style.css">
  </head>
  <body>
    <div class="CommonContent">
      <div class="CommonContentArea">
        <h1>Internal IDs</h1>

<p>The internal db4o ID is a physical pointer into the database with only one indirection in the file to the actual object so it is the fastest external access to an object db4o provides. The internal ID of an object is available with</p>



<span name="cs_wiki_filter" csw_filters="net">
<p>.NET:<code>IObjectContainer.Ext().GetID(object)</code></p>
</span>
<p>To get an object for an internal ID use</p>


<span name="cs_wiki_filter" csw_filters="net">
<p>.NET:<code>IObjectContainer.Ext().GetByID(id)</code></p>
</span>
<p>Note that #getByID() does not activate objects. If you want to work with objects that you get with #getByID(), your code would have to make sure the object is <a href="../../object_lifecycle/activation.html" class="wikiLink">activated</a> by calling</p>


<span name="cs_wiki_filter" csw_filters="net">
<p>.NET <code>IObjectContainer.Activate(object, depth)</code></p>
</span>
<p>db4o assigns internal IDs to any stored first class object. These internal IDs are guaranteed to be unique within one ObjectContainer/ObjectServer and they will stay the same for every object when an ObjectContainer/ObjectServer is closed and reopened. Internal IDs <b>will change</b> when an object is moved from one ObjectContainer to another, as it happens during <a href="../maintenance/defragment.html" class="wikiLink">Defragment</a>.</p></div>
    </div>
    <div id="footer">
					This revision (8) was last Modified 2007-05-07T12:40:29 by Tetyana.
				</div>
  </body>
</html>