Questions tagged [concrete-inheritance]
23 questions
57
votes
5 answers
Should I avoid multi-table (concrete) inheritance in Django by any means?
Many experienced developers recommend against using Django multi-table inheritance because of its poor performance:
Django gotcha: concrete inheritance by Jacob Kaplan-Moss, a core contributor of Django.
In nearly every case, abstract inheritance…

utapyngo
- 6,946
- 3
- 44
- 65
26
votes
1 answer
Different inheritance types in the same schema
I'm using Doctrine 1.2 on a symfony project,
and I'm considering mixing concrete and column aggregation inheritance types in my schema:
column aggregation lets me query in a parent table and get both parent and child records, while concrete…

greg0ire
- 22,714
- 16
- 72
- 101
15
votes
5 answers
Concrete method in abstract class
I understand an abstract class may contain abstract and concrete methods (i.e with body implementation). My question are: can subclasses inherit/override concrete methods from an abstract superclass. And secondly do they have to implement concrete…

user2240664
- 183
- 1
- 1
- 7
6
votes
1 answer
SQLAlchemy Polymorphic Relationship with Concrete Inheritance
I am using the concrete table inheritance with SQLAlchemy. In declartive style model class, I have configured it successfully.
My code just like:
class Entry(AbstractConcreteBase, db.Model):
"""Base Class of Entry."""
id =…

Jiangge Zhang
- 4,298
- 4
- 25
- 33
4
votes
1 answer
Doctrine 2 Concrete Table Inheritance with Associations
I have read Doctrine 2 Inheritance Mapping with Association but say if you needed Animal to be an entity in its own right, say for creating option lists.
In this case the Discriminator Column for a Pet is in the species column in the animal…

gawpertron
- 1,867
- 3
- 21
- 37
4
votes
1 answer
SQL Concrete Vs Class Table Inheritance query speed on one subtype
I am weighing up between Concrete and Class Table Inheritance (see example below). Class Table certainly has a lot of benefits, in particular for my scenario, super table columns are guaranteed consistent across the full data set. However I have…

Nathan Williams
- 429
- 6
- 14
4
votes
1 answer
Peewee and Database Inheritance
I'm trying to learn Peewee and Bottle by making a book note-taking application.
Say I have the following entities:
Subject
Book
Chapter
Note
Tag
I would like to be able to make Notes for Chapters, Books, and Subjects.
In a DB, you would do:
create…

Matthew Moisen
- 16,701
- 27
- 128
- 231
3
votes
3 answers
Symfony2, Propel fixtures and concrete inheritance
I got an issue with Propel fixtures loading in Symfony2. I have the following schema: