For non primary key reference
BinderHelper.createSyntheticPropertyReference runs first in ToOneFkSecondPass.doSecondPass which causes Component.cachedSelectables to be initialized. Then followed by TableBinder.bindForeignKey in ToOneFkSecondPass.doSecondPass which adds foreign columns in Component but without updating cachedSelectables Thus, PersistentClass.validate fails due to outdated Component.cachedSelectables |