- Refactored to improve inheritance detection at boot
- Improved Registry of parent/child tables
- Simplified a lot of the logic
- Table naming is now configurable
- Removed
uses_mti
- Greatly improved future-proofing injection strategy.
- No longer overwriting (and maintaining) ActiveRecord Calculation sub-routines.
- Instead of injecting at
build_select, we're injecting atbuild_arelwith one additional new sub-routine (build_mti)build_mtisub-routine detects if an MTI projection is needed based on grouping and selecting from query being built.
- No longer need to use
uses_mti
- More reliable class discrimination
- Improved view support
- Fixes issue where inheritance check is called multiple times.
- Can handle a (simple) view that references a table that uses MTI
- PSQL Adapter now responds to version
- Improved column pulls from DB
- Specs!
- Breaking Change: must call
uses_mtiin models - MTI class discrimination happens before STI
- More reliable projection/unprojection
- Improved table_name inference
- Improve how
ActiveRecord::MTIis injected into Rails
- Allow SQL calculations (like
sumandcount) to execute by removing unneeded MTI projections
- Default value to return when finding MTI class