<p dir="auto"><strong>Migrated issue, originally created by Anonymous</strong></p>
<p dir="auto">Hello everyone,</p>
<p dir="auto">this is the first of two tickets I'm going to open regarding the polymorphic map, which I consider a very neat feature of SA. I haven't found much documentation on it though, so I'm not sure whether these are features or bugs - I'd guess the latter.</p>
<p dir="auto">The polymorphic map, as I understand it, is an alternative to the default polymorphic_identity system and f.e. suitable for setups where you would dynamically decide which class to map to.</p>
<p dir="auto">In that case you shouldn't have to set a polymorphic identity in your polymorphic classes. This, however, seems to be necessary for inserting objects into the database, as the discriminator otherwise would be inserted as NULL.</p>
<p dir="auto">I have attached a test to demonstrate this.</p>
<p dir="auto">Best Regards,<br>
Thomas Wiebe</p>
<hr>
<p dir="auto">Attachments: <a href="../wiki/imported_issue_attachments/1408/test_insert_polymorphic_map.py">test_insert_polymorphic_map.py</a></p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="+ sphinx-build -b man -d sqlalchemy doc/build .
Running Sphinx v3.4.3
/usr/lib64/python3.8/site-packages/scss/selector.py:26: FutureWarning: Possible nested set at position 329
  SELECTOR_TOKENIZER = re.compile(r'''
WARNING: while setting up extension changelog: extension 'changelog' has no setup() function; is it really a Sphinx extension module?"><pre class="notranslate"><code class="notranslate">+ sphinx-build -b man -d sqlalchemy doc/build .
Running Sphinx v3.4.3
/usr/lib64/python3.8/site-packages/scss/selector.py:26: FutureWarning: Possible nested set at position 329
  SELECTOR_TOKENIZER = re.compile(r'''
WARNING: while setting up extension changelog: extension 'changelog' has no setup() function; is it really a Sphinx extension module?
</code></pre></div>