gino icon indicating copy to clipboard operation
gino copied to clipboard

Table inheritance?

Open fantix opened this issue 8 years ago • 2 comments

fantix avatar Aug 04 '17 05:08 fantix

Using table model inheritance flawlessly here :)

aprilmay avatar May 21 '18 06:05 aprilmay

Sorry just edited my reply - do you mind sharing your example please? I just tried and it's not working:

class Vehicle(db.Model):
    __tablename__ = 'vehicles'

    id = db.Column(db.BigInteger(), primary_key=True)
    seats = db.Column(db.Integer())


class Van(Vehicle):
    __tablename__ = 'vans'

    capacity = db.Column(db.Unicode())

print(Van.__table__.name)  # vehicles

fantix avatar May 21 '18 07:05 fantix