Changeset 4283
- Timestamp:
- 04/21/08 22:19:13 (15 months ago)
- Files:
-
- 1 modified
-
branches/0.11/lib/Doctrine/Data/Import.php (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
branches/0.11/lib/Doctrine/Data/Import.php
r4249 r4283 168 168 $relation = $record->getTable()->getRelation($relationName); 169 169 if ($relation->getClass() !== get_class($relatedRowKeyObject)) { 170 throw new Doctrine_Data_Exception('Class referred to is expected to be "' . get_class($relatedRowKeyObject) . '" and "' . $relation->getClass() .'" was given'); 170 if ( ! is_subclass_of($relatedRowKeyObject, $relation->getClass())) { 171 throw new Doctrine_Data_Exception(sprintf( 172 'Class referred to is expected to be "%s" and "%s" was given', 173 get_class($relatedRowKeyObject), $relation->getClass())); 174 } 171 175 } 172 176