class_docstr: deals with inheritance and many-to-many relationships
class_docstr_tok: ["deals","with","inheritance","and","many-to-many","relationships"]
code: def test_get(self):
      class Foo:
          def __init__(self, data=None):
              self.data = data
  
      class Bar(Foo):
          pass
  
      self.mapper_registry.map_imperatively(Foo, foo)
      self.mapper_registry.map_imperatively(Bar, bar, inherits=Foo)
      print(foo.join(bar).primary_key)
      print(class_mapper(Bar).primary_key)
      b = Bar("somedata")
      sess = fixture_session()
      sess.add(b)
      sess.flush()
      sess.expunge_all()
  
      # test that "bar.bid" does not need to be referenced in a get
      # (ticket 185)
      assert sess.get(Bar, b.id).id == b.id
  
imports: from sqlalchemy import Column
  from sqlalchemy import ForeignKey
  from sqlalchemy import Integer
  from sqlalchemy import Sequence
  from sqlalchemy import String
  from sqlalchemy import Table
  from sqlalchemy.orm import class_mapper
  from sqlalchemy.orm import relationship
  from sqlalchemy.testing import config
  from sqlalchemy.testing import eq_
  from sqlalchemy.testing import fixtures
  from sqlalchemy.testing.fixtures import fixture_session
  from sqlalchemy.testing.provision import normalize_sequence
label_desc: Use image node_id 2 for calling the InheritTest2 obj's underlying member method code with example usage: obj.test_get() without return types