@@ -509,6 +509,44 @@ class SimpleItem(Base):
509509 other_item = relationship('OtherItem', uselist=False)
510510""" )
511511
512+ def test_onetomany_noinflect (self ):
513+ Table (
514+ 'oglkrogk' , self .metadata ,
515+ Column ('id' , INTEGER , primary_key = True ),
516+ Column ('fehwiuhfiwID' , INTEGER ),
517+ ForeignKeyConstraint (['fehwiuhfiwID' ], ['fehwiuhfiw.id' ]),
518+ )
519+ Table (
520+ 'fehwiuhfiw' , self .metadata ,
521+ Column ('id' , INTEGER , primary_key = True )
522+ )
523+
524+ eq_ (self .generate_code (), """\
525+ # coding: utf-8
526+ from sqlalchemy import Column, ForeignKey, Integer
527+ from sqlalchemy.orm import relationship
528+ from sqlalchemy.ext.declarative import declarative_base
529+
530+
531+ Base = declarative_base()
532+ metadata = Base.metadata
533+
534+
535+ class Fehwiuhfiw(Base):
536+ __tablename__ = 'fehwiuhfiw'
537+
538+ id = Column(Integer, primary_key=True)
539+
540+
541+ class Oglkrogk(Base):
542+ __tablename__ = 'oglkrogk'
543+
544+ id = Column(Integer, primary_key=True)
545+ fehwiuhfiwID = Column(ForeignKey('fehwiuhfiw.id'))
546+
547+ fehwiuhfiw = relationship('Fehwiuhfiw')
548+ """ )
549+
512550 def test_manytomany (self ):
513551 Table (
514552 'simple_items' , self .metadata ,
0 commit comments