v1.0.384
daftspunk
tagged this
27 Nov 21:44
This is contextual to the relationship type, for instance: - hasOne expects the "key" to be the foreign key, while "other key" to be the local key. Whereas; - belongsTo expects the "key" to be the local key and the "other key" to be the foreign key. This is seen as more natural and automatic when declaring the relation, the "key" is common and expected off the cuff, whereas the "otherKey" is rarely used but available when needed. Adding the getOtherKey method to HasOneOrMany relations to bring the PHP API in line with the relationship definition. This is necessary for a consistent API, needed in other areas (Refs https://github.com/octobercms/october/pull/2507)
Assets 2
-
2016-11-27T21:44:13Z -
2016-11-27T21:44:13Z -