gino
gino copied to clipboard
Table inheritance?
Using table model inheritance flawlessly here :)
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