Answer the question
In order to leave comments, you need to log in
How effective is Single Table Inheritance?
Real example
class Authentication{
$password;
$email;
}
User extends Authentication{
$name;
$posts; // relation ID
}
Admin extends Authentication {
$actions;
}
Moderator extends Authentication{
$name;
$moderatedPosts;
}
Supportextends Authentication{
$name;
$helpedUsers; // relation ID
}
name // for everyone, even admin who do not have name
password
email
// relations
helpedUsers // referenced on this table
moderatedPosts // join referenced to external table
posts // join referenced to external table
actions // long json of serialized objects
Answer the question
In order to leave comments, you need to log in
we have a million records with doctrine inheritance and everything flies
https://www.doctrine-project.org/projects/doctrine...
see how it is implemented there
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question