Slide 20
Slide 20 text
Problems resulted by PA
• Commenting may require some additional logic which will be duplicated in
many places (Article, Photo, etc.). Moving this logic into separate module
isn’t very helpful.
• We can’t use JOINs because we really have no commentable relation and
we can’t row-by-row change relation which we join.
• If we need some additional attributes/columns for commentable entities -
we will have to add them to all commentable entities/relations. (counter
cache is the simplest example).
• You can’t define association in metadata and can’t add constraints on
foreign keys.
• You can’t use polymorphic associations in the case when, for example,
Cargo has two addresses: cargos.destination_point, cargos.start_point.