fix orm 3

This commit is contained in:
yuri
2016-09-14 14:03:30 +03:00
parent ef19dc3330
commit da2cebd765
2 changed files with 5 additions and 5 deletions
+2 -2
View File
@@ -212,8 +212,8 @@ abstract class Mapper implements IMapper
$params['whereClause'][$foreignKey] = $entity->get($key);
if ($relType == IEntity::HAS_CHILDREN) {
$foreignTypeKey = $keySet['foreignTypeKey'];
$params['whereClause'][$foreignTypeKey] = $entity->getEntityType();
$foreignType = $keySet['foreignType'];
$params['whereClause'][$foreignType] = $entity->getEntityType();
}
if ($relType == IEntity::HAS_ONE) {
+3 -3
View File
@@ -978,14 +978,14 @@ abstract class Base
if (isset($relOpt['foreignKey'])) {
$foreignKey = $relOpt['foreignKey'];
}
$foreignTypeKey = 'parentType';
$foreignType = 'parentType';
if (isset($relOpt['foreignType'])) {
$foreignTypeKey = $relOpt['foreignType'];
$foreignType = $relOpt['foreignType'];
}
return array(
'key' => $key,
'foreignKey' => $foreignKey,
'foreignTypeKey' => $foreignTypeKey,
'foreignType' => $foreignType,
);
case IEntity::MANY_MANY: