title: How do I get the key value of a db.ReferenceProperty without a database hit?
body: <p>Is there a way to get the key (or id) value of a db.ReferenceProperty, without dereferencing the actual entity it points to?  I have been digging around - it looks like the key is stored as the property name preceeded with an _, but I have been unable to get any code working.  Examples would be much appreciated.  Thanks.</p>
  
  <p>EDIT:  Here is what I have unsuccessfully tried:</p>
  
  <pre><code>class Comment(db.Model):
      series = db.ReferenceProperty(reference_class=Series);
  
      def series_id(self):
          return self._series
  </code></pre>
  
  <p>And in my template:</p>
  
  <pre><code>&lt;a href="games/view-series.html?series={{comment.series_id}}#comm{{comment.key.id}}"&gt;more&lt;/a&gt;
  </code></pre>
  
  <p>The result:</p>
  
  <pre><code>&lt;a href="games/view-series.html?series=#comm59"&gt;more&lt;/a&gt;
  </code></pre>