Reorder relationship sanity checks, run them only on known loaded classes
authorPeter Rabbitson <ribasushi@cpan.org>
Mon, 16 Sep 2013 17:16:48 +0000 (19:16 +0200)
committerPeter Rabbitson <ribasushi@cpan.org>
Mon, 16 Sep 2013 18:18:08 +0000 (20:18 +0200)
commit9e7525a2cc9d7459ee89a6d2c85913a8b8c4eff9
tree92589c34c643dfc9dd1a034e1ccd2bf7d0aa5c0d
parent0b0743afcb6904727aa51cc39fabeea190f5dac6
Reorder relationship sanity checks, run them only on known loaded classes

This avoids load-order issues in contrived situations where column definitions are
split across class inheritance (which gets rather fun doe to the prorotypical
inheritance of resultsource instances themselves)

While not an immediate problem in code in the wild, the hash randomization in 5.18
now leads to random load order, and as a result more load-order combinations are
tried and can eventually fail. This should reduce these situations to a minimum,
and 79061be1 should keep us appraised of any problems while DBICT:Schema evolves

Ideally the checks will be lifted up to schema-composition time, but we are not
there yet, one yak at a time.
Changes
lib/DBIx/Class/Relationship/BelongsTo.pm
lib/DBIx/Class/Relationship/HasMany.pm
lib/DBIx/Class/Relationship/HasOne.pm