Exemplo n.º 1
0
 /**
  * Exports the object as an array.
  *
  * You can specify the key type of the array by passing one of the class
  * type constants.
  *
  * @param     string  $keyType (optional) One of the class type constants TableMap::TYPE_PHPNAME, TableMap::TYPE_CAMELNAME,
  *                    TableMap::TYPE_COLNAME, TableMap::TYPE_FIELDNAME, TableMap::TYPE_NUM.
  *                    Defaults to TableMap::TYPE_PHPNAME.
  * @param     boolean $includeLazyLoadColumns (optional) Whether to include lazy loaded columns. Defaults to TRUE.
  * @param     array $alreadyDumpedObjects List of objects to skip to avoid recursion
  * @param     boolean $includeForeignObjects (optional) Whether to include hydrated related objects. Default to FALSE.
  *
  * @return array an associative array containing the field names (as keys) and field values
  */
 public function toArray($keyType = TableMap::TYPE_PHPNAME, $includeLazyLoadColumns = true, $alreadyDumpedObjects = array(), $includeForeignObjects = false)
 {
     if (isset($alreadyDumpedObjects['User'][$this->hashCode()])) {
         return '*RECURSION*';
     }
     $alreadyDumpedObjects['User'][$this->hashCode()] = true;
     $keys = UserTableMap::getFieldNames($keyType);
     $keys_resource = \App\Propel\Map\ResourceTableMap::getFieldNames($keyType);
     $result = array($keys[0] => $this->getUserId(), $keys[1] => $this->getResourceId(), $keys[2] => $this->getUseName(), $keys[3] => $this->getUserSurname(), $keys[4] => $this->getUserLogin(), $keys[5] => $this->getUserPass(), $keys[6] => $this->getUserPassIsTemp(), $keys[7] => $this->getRememberToken(), $keys[8] => $this->getUserEmail(), $keys[9] => $this->getUserPhone(), $keys[10] => $this->getUserAddress(), $keys[11] => $this->getRoleId(), $keys[12] => $this->getUserIsValidated(), $keys[13] => $this->getUserIsActive(), $keys[14] => $this->getUserPic(), $keys[15] => $this->getCreatedAt(), $keys[16] => $this->getUpdatedAt(), $keys_resource[1] => $this->getResourceType(), $keys_resource[2] => $this->getSocialViews(), $keys_resource[3] => $this->getSocialLikes(), $keys_resource[4] => $this->getSocialDislikes(), $keys_resource[5] => $this->getSocialComments(), $keys_resource[6] => $this->getSocialFavourites(), $keys_resource[7] => $this->getSocialRecommendations());
     if ($result[$keys[15]] instanceof \DateTime) {
         $result[$keys[15]] = $result[$keys[15]]->format('c');
     }
     if ($result[$keys[16]] instanceof \DateTime) {
         $result[$keys[16]] = $result[$keys[16]]->format('c');
     }
     $virtualColumns = $this->virtualColumns;
     foreach ($virtualColumns as $key => $virtualColumn) {
         $result[$key] = $virtualColumn;
     }
     if ($includeForeignObjects) {
         if (null !== $this->aFile) {
             switch ($keyType) {
                 case TableMap::TYPE_CAMELNAME:
                     $key = 'file';
                     break;
                 case TableMap::TYPE_FIELDNAME:
                     $key = 'file';
                     break;
                 default:
                     $key = 'File';
             }
             $result[$key] = $this->aFile->toArray($keyType, $includeLazyLoadColumns, $alreadyDumpedObjects, true);
         }
         if (null !== $this->aRole) {
             switch ($keyType) {
                 case TableMap::TYPE_CAMELNAME:
                     $key = 'role';
                     break;
                 case TableMap::TYPE_FIELDNAME:
                     $key = 'role';
                     break;
                 default:
                     $key = 'Role';
             }
             $result[$key] = $this->aRole->toArray($keyType, $includeLazyLoadColumns, $alreadyDumpedObjects, true);
         }
         if (null !== $this->aResource) {
             switch ($keyType) {
                 case TableMap::TYPE_CAMELNAME:
                     $key = 'resource';
                     break;
                 case TableMap::TYPE_FIELDNAME:
                     $key = 'resource';
                     break;
                 default:
                     $key = 'Resource';
             }
             $result[$key] = $this->aResource->toArray($keyType, $includeLazyLoadColumns, $alreadyDumpedObjects, true);
         }
         if (null !== $this->collOrders) {
             switch ($keyType) {
                 case TableMap::TYPE_CAMELNAME:
                     $key = 'orders';
                     break;
                 case TableMap::TYPE_FIELDNAME:
                     $key = 'orders';
                     break;
                 default:
                     $key = 'Orders';
             }
             $result[$key] = $this->collOrders->toArray(null, false, $keyType, $includeLazyLoadColumns, $alreadyDumpedObjects);
         }
         if (null !== $this->collSocialViews) {
             switch ($keyType) {
                 case TableMap::TYPE_CAMELNAME:
                     $key = 'socialViews';
                     break;
                 case TableMap::TYPE_FIELDNAME:
                     $key = 'social_views';
                     break;
                 default:
                     $key = 'SocialViews';
             }
             $result[$key] = $this->collSocialViews->toArray(null, false, $keyType, $includeLazyLoadColumns, $alreadyDumpedObjects);
         }
         if (null !== $this->collSocialLikes) {
             switch ($keyType) {
                 case TableMap::TYPE_CAMELNAME:
                     $key = 'socialLikes';
                     break;
                 case TableMap::TYPE_FIELDNAME:
                     $key = 'social_likes';
                     break;
                 default:
                     $key = 'SocialLikes';
             }
             $result[$key] = $this->collSocialLikes->toArray(null, false, $keyType, $includeLazyLoadColumns, $alreadyDumpedObjects);
         }
         if (null !== $this->collSocialComments) {
             switch ($keyType) {
                 case TableMap::TYPE_CAMELNAME:
                     $key = 'socialComments';
                     break;
                 case TableMap::TYPE_FIELDNAME:
                     $key = 'social_comments';
                     break;
                 default:
                     $key = 'SocialComments';
             }
             $result[$key] = $this->collSocialComments->toArray(null, false, $keyType, $includeLazyLoadColumns, $alreadyDumpedObjects);
         }
         if (null !== $this->collSocialRecommendationsRelatedByUserId) {
             switch ($keyType) {
                 case TableMap::TYPE_CAMELNAME:
                     $key = 'socialRecommendations';
                     break;
                 case TableMap::TYPE_FIELDNAME:
                     $key = 'social_recommendations';
                     break;
                 default:
                     $key = 'SocialRecommendations';
             }
             $result[$key] = $this->collSocialRecommendationsRelatedByUserId->toArray(null, false, $keyType, $includeLazyLoadColumns, $alreadyDumpedObjects);
         }
         if (null !== $this->collSocialRecommendationsRelatedBySocialRecommendationTo) {
             switch ($keyType) {
                 case TableMap::TYPE_CAMELNAME:
                     $key = 'socialRecommendations';
                     break;
                 case TableMap::TYPE_FIELDNAME:
                     $key = 'social_recommendations';
                     break;
                 default:
                     $key = 'SocialRecommendations';
             }
             $result[$key] = $this->collSocialRecommendationsRelatedBySocialRecommendationTo->toArray(null, false, $keyType, $includeLazyLoadColumns, $alreadyDumpedObjects);
         }
         if (null !== $this->collUserPeriodicPlans) {
             switch ($keyType) {
                 case TableMap::TYPE_CAMELNAME:
                     $key = 'userPeriodicPlans';
                     break;
                 case TableMap::TYPE_FIELDNAME:
                     $key = 'user_periodic_plans';
                     break;
                 default:
                     $key = 'UserPeriodicPlans';
             }
             $result[$key] = $this->collUserPeriodicPlans->toArray(null, false, $keyType, $includeLazyLoadColumns, $alreadyDumpedObjects);
         }
         if (null !== $this->collWishlists) {
             switch ($keyType) {
                 case TableMap::TYPE_CAMELNAME:
                     $key = 'wishlists';
                     break;
                 case TableMap::TYPE_FIELDNAME:
                     $key = 'wishlists';
                     break;
                 default:
                     $key = 'Wishlists';
             }
             $result[$key] = $this->collWishlists->toArray(null, false, $keyType, $includeLazyLoadColumns, $alreadyDumpedObjects);
         }
     }
     return $result;
 }
Exemplo n.º 2
0
 /**
  * Performs a DELETE on the database based on the current ModelCriteria
  *
  * @param ConnectionInterface $con the connection to use
  * @return int             The number of affected rows (if supported by underlying database driver).  This includes CASCADE-related rows
  *                         if supported by native driver or if emulated using Propel.
  * @throws PropelException Any exceptions caught during processing will be
  *                         rethrown wrapped into a PropelException.
  */
 public function delete(ConnectionInterface $con = null)
 {
     if (null === $con) {
         $con = Propel::getServiceContainer()->getWriteConnection(ResourceTableMap::DATABASE_NAME);
     }
     $criteria = $this;
     // Set the correct dbName
     $criteria->setDbName(ResourceTableMap::DATABASE_NAME);
     // use transaction because $criteria could contain info
     // for more than one table or we could emulating ON DELETE CASCADE, etc.
     return $con->transaction(function () use($con, $criteria) {
         $affectedRows = 0;
         // initialize var to track total num of affected rows
         ResourceTableMap::removeInstanceFromPool($criteria);
         $affectedRows += ModelCriteria::delete($con);
         ResourceTableMap::clearRelatedInstancePool();
         return $affectedRows;
     });
 }
Exemplo n.º 3
0
 /**
  * Exports the object as an array.
  *
  * You can specify the key type of the array by passing one of the class
  * type constants.
  *
  * @param     string  $keyType (optional) One of the class type constants TableMap::TYPE_PHPNAME, TableMap::TYPE_CAMELNAME,
  *                    TableMap::TYPE_COLNAME, TableMap::TYPE_FIELDNAME, TableMap::TYPE_NUM.
  *                    Defaults to TableMap::TYPE_PHPNAME.
  * @param     boolean $includeLazyLoadColumns (optional) Whether to include lazy loaded columns. Defaults to TRUE.
  * @param     array $alreadyDumpedObjects List of objects to skip to avoid recursion
  * @param     boolean $includeForeignObjects (optional) Whether to include hydrated related objects. Default to FALSE.
  *
  * @return array an associative array containing the field names (as keys) and field values
  */
 public function toArray($keyType = TableMap::TYPE_PHPNAME, $includeLazyLoadColumns = true, $alreadyDumpedObjects = array(), $includeForeignObjects = false)
 {
     if (isset($alreadyDumpedObjects['Promotion'][$this->hashCode()])) {
         return '*RECURSION*';
     }
     $alreadyDumpedObjects['Promotion'][$this->hashCode()] = true;
     $keys = PromotionTableMap::getFieldNames($keyType);
     $keys_resource = \App\Propel\Map\ResourceTableMap::getFieldNames($keyType);
     $result = array($keys[0] => $this->getPromotionId(), $keys[1] => $this->getResourceId(), $keys[2] => $this->getPromotionTypeId(), $keys[3] => $this->getPromotionValue(), $keys[4] => $this->getPromotionGift(), $keys[5] => $this->getPromotionDescription(), $keys[6] => $this->getPromotionStartingPoint(), $keys[7] => $this->getPromotionStartingDate(), $keys[8] => $this->getPromotionEndingDate(), $keys[9] => $this->getPromotionIsActive(), $keys[10] => $this->getCreatedAt(), $keys[11] => $this->getUpdatedAt(), $keys_resource[1] => $this->getResourceType(), $keys_resource[2] => $this->getSocialViews(), $keys_resource[3] => $this->getSocialLikes(), $keys_resource[4] => $this->getSocialDislikes(), $keys_resource[5] => $this->getSocialComments(), $keys_resource[6] => $this->getSocialFavourites(), $keys_resource[7] => $this->getSocialRecommendations());
     if ($result[$keys[7]] instanceof \DateTime) {
         $result[$keys[7]] = $result[$keys[7]]->format('c');
     }
     if ($result[$keys[8]] instanceof \DateTime) {
         $result[$keys[8]] = $result[$keys[8]]->format('c');
     }
     if ($result[$keys[10]] instanceof \DateTime) {
         $result[$keys[10]] = $result[$keys[10]]->format('c');
     }
     if ($result[$keys[11]] instanceof \DateTime) {
         $result[$keys[11]] = $result[$keys[11]]->format('c');
     }
     $virtualColumns = $this->virtualColumns;
     foreach ($virtualColumns as $key => $virtualColumn) {
         $result[$key] = $virtualColumn;
     }
     if ($includeForeignObjects) {
         if (null !== $this->aResource) {
             switch ($keyType) {
                 case TableMap::TYPE_CAMELNAME:
                     $key = 'resource';
                     break;
                 case TableMap::TYPE_FIELDNAME:
                     $key = 'resource';
                     break;
                 default:
                     $key = 'Resource';
             }
             $result[$key] = $this->aResource->toArray($keyType, $includeLazyLoadColumns, $alreadyDumpedObjects, true);
         }
         if (null !== $this->aPromotionType) {
             switch ($keyType) {
                 case TableMap::TYPE_CAMELNAME:
                     $key = 'promotionType';
                     break;
                 case TableMap::TYPE_FIELDNAME:
                     $key = 'promotion_type';
                     break;
                 default:
                     $key = 'PromotionType';
             }
             $result[$key] = $this->aPromotionType->toArray($keyType, $includeLazyLoadColumns, $alreadyDumpedObjects, true);
         }
     }
     return $result;
 }
Exemplo n.º 4
0
 /**
  * Exports the object as an array.
  *
  * You can specify the key type of the array by passing one of the class
  * type constants.
  *
  * @param     string  $keyType (optional) One of the class type constants TableMap::TYPE_PHPNAME, TableMap::TYPE_CAMELNAME,
  *                    TableMap::TYPE_COLNAME, TableMap::TYPE_FIELDNAME, TableMap::TYPE_NUM.
  *                    Defaults to TableMap::TYPE_PHPNAME.
  * @param     boolean $includeLazyLoadColumns (optional) Whether to include lazy loaded columns. Defaults to TRUE.
  * @param     array $alreadyDumpedObjects List of objects to skip to avoid recursion
  * @param     boolean $includeForeignObjects (optional) Whether to include hydrated related objects. Default to FALSE.
  *
  * @return array an associative array containing the field names (as keys) and field values
  */
 public function toArray($keyType = TableMap::TYPE_PHPNAME, $includeLazyLoadColumns = true, $alreadyDumpedObjects = array(), $includeForeignObjects = false)
 {
     if (isset($alreadyDumpedObjects['Category'][$this->hashCode()])) {
         return '*RECURSION*';
     }
     $alreadyDumpedObjects['Category'][$this->hashCode()] = true;
     $keys = CategoryTableMap::getFieldNames($keyType);
     $keys_resource = \App\Propel\Map\ResourceTableMap::getFieldNames($keyType);
     $result = array($keys[0] => $this->getCategoryId(), $keys[1] => $this->getResourceId(), $keys[2] => $this->getCategoryName(), $keys[3] => $this->getCategoryDescription(), $keys[4] => $this->getCategoryPic(), $keys[5] => $this->getCreatedAt(), $keys[6] => $this->getUpdatedAt(), $keys[7] => $this->getTreeLeft(), $keys[8] => $this->getTreeRight(), $keys[9] => $this->getTreeLevel(), $keys_resource[1] => $this->getResourceType(), $keys_resource[2] => $this->getSocialViews(), $keys_resource[3] => $this->getSocialLikes(), $keys_resource[4] => $this->getSocialDislikes(), $keys_resource[5] => $this->getSocialComments(), $keys_resource[6] => $this->getSocialFavourites(), $keys_resource[7] => $this->getSocialRecommendations());
     if ($result[$keys[5]] instanceof \DateTime) {
         $result[$keys[5]] = $result[$keys[5]]->format('c');
     }
     if ($result[$keys[6]] instanceof \DateTime) {
         $result[$keys[6]] = $result[$keys[6]]->format('c');
     }
     $virtualColumns = $this->virtualColumns;
     foreach ($virtualColumns as $key => $virtualColumn) {
         $result[$key] = $virtualColumn;
     }
     if ($includeForeignObjects) {
         if (null !== $this->aResource) {
             switch ($keyType) {
                 case TableMap::TYPE_CAMELNAME:
                     $key = 'resource';
                     break;
                 case TableMap::TYPE_FIELDNAME:
                     $key = 'resource';
                     break;
                 default:
                     $key = 'Resource';
             }
             $result[$key] = $this->aResource->toArray($keyType, $includeLazyLoadColumns, $alreadyDumpedObjects, true);
         }
         if (null !== $this->aFile) {
             switch ($keyType) {
                 case TableMap::TYPE_CAMELNAME:
                     $key = 'file';
                     break;
                 case TableMap::TYPE_FIELDNAME:
                     $key = 'file';
                     break;
                 default:
                     $key = 'File';
             }
             $result[$key] = $this->aFile->toArray($keyType, $includeLazyLoadColumns, $alreadyDumpedObjects, true);
         }
         if (null !== $this->collProducts) {
             switch ($keyType) {
                 case TableMap::TYPE_CAMELNAME:
                     $key = 'products';
                     break;
                 case TableMap::TYPE_FIELDNAME:
                     $key = 'products';
                     break;
                 default:
                     $key = 'Products';
             }
             $result[$key] = $this->collProducts->toArray(null, false, $keyType, $includeLazyLoadColumns, $alreadyDumpedObjects);
         }
     }
     return $result;
 }
Exemplo n.º 5
0
 /**
  * Initializes the collResources collection.
  *
  * By default this just sets the collResources collection to an empty array (like clearcollResources());
  * however, you may wish to override this method in your stub class to provide setting appropriate
  * to your application -- for example, setting the initial array to the values stored in database.
  *
  * @param      boolean $overrideExisting If set to true, the method call initializes
  *                                        the collection even if it is not empty
  *
  * @return void
  */
 public function initResources($overrideExisting = true)
 {
     if (null !== $this->collResources && !$overrideExisting) {
         return;
     }
     $collectionClassName = ResourceTableMap::getTableMap()->getCollectionClassName();
     $this->collResources = new $collectionClassName();
     $this->collResources->setModel('\\App\\Propel\\Resource');
 }
Exemplo n.º 6
0
 /**
  * Performs a DELETE on the database, given a Resource or Criteria object OR a primary key value.
  *
  * @param mixed               $values Criteria or Resource object or primary key or array of primary keys
  *              which is used to create the DELETE statement
  * @param  ConnectionInterface $con the connection to use
  * @return int             The number of affected rows (if supported by underlying database driver).  This includes CASCADE-related rows
  *                         if supported by native driver or if emulated using Propel.
  * @throws PropelException Any exceptions caught during processing will be
  *                         rethrown wrapped into a PropelException.
  */
 public static function doDelete($values, ConnectionInterface $con = null)
 {
     if (null === $con) {
         $con = Propel::getServiceContainer()->getWriteConnection(ResourceTableMap::DATABASE_NAME);
     }
     if ($values instanceof Criteria) {
         // rename for clarity
         $criteria = $values;
     } elseif ($values instanceof \App\Propel\Resource) {
         // it's a model object
         // create criteria based on pk values
         $criteria = $values->buildPkeyCriteria();
     } else {
         // it's a primary key, or an array of pks
         $criteria = new Criteria(ResourceTableMap::DATABASE_NAME);
         $criteria->add(ResourceTableMap::COL_RESOURCE_ID, (array) $values, Criteria::IN);
     }
     $query = ResourceQuery::create()->mergeWith($criteria);
     if ($values instanceof Criteria) {
         ResourceTableMap::clearInstancePool();
     } elseif (!is_object($values)) {
         // it's a primary key, or an array of pks
         foreach ((array) $values as $singleval) {
             ResourceTableMap::removeInstanceFromPool($singleval);
         }
     }
     return $query->delete($con);
 }
Exemplo n.º 7
0
 /**
  * Exports the object as an array.
  *
  * You can specify the key type of the array by passing one of the class
  * type constants.
  *
  * @param     string  $keyType (optional) One of the class type constants TableMap::TYPE_PHPNAME, TableMap::TYPE_CAMELNAME,
  *                    TableMap::TYPE_COLNAME, TableMap::TYPE_FIELDNAME, TableMap::TYPE_NUM.
  *                    Defaults to TableMap::TYPE_PHPNAME.
  * @param     boolean $includeLazyLoadColumns (optional) Whether to include lazy loaded columns. Defaults to TRUE.
  * @param     array $alreadyDumpedObjects List of objects to skip to avoid recursion
  * @param     boolean $includeForeignObjects (optional) Whether to include hydrated related objects. Default to FALSE.
  *
  * @return array an associative array containing the field names (as keys) and field values
  */
 public function toArray($keyType = TableMap::TYPE_PHPNAME, $includeLazyLoadColumns = true, $alreadyDumpedObjects = array(), $includeForeignObjects = false)
 {
     if (isset($alreadyDumpedObjects['Product'][$this->hashCode()])) {
         return '*RECURSION*';
     }
     $alreadyDumpedObjects['Product'][$this->hashCode()] = true;
     $keys = ProductTableMap::getFieldNames($keyType);
     $keys_resource = \App\Propel\Map\ResourceTableMap::getFieldNames($keyType);
     $result = array($keys[0] => $this->getProductId(), $keys[1] => $this->getResourceId(), $keys[2] => $this->getProductName(), $keys[3] => $this->getProductDescription(), $keys[4] => $this->getCategoryId(), $keys[5] => $this->getProviderId(), $keys[6] => $this->getUnitId(), $keys[7] => $this->getProductRange(), $keys[8] => $this->getProductPrice(), $keys[9] => $this->getProductIsActive(), $keys[10] => $this->getProductPic(), $keys[11] => $this->getCreatedAt(), $keys[12] => $this->getUpdatedAt(), $keys_resource[1] => $this->getResourceType(), $keys_resource[2] => $this->getSocialViews(), $keys_resource[3] => $this->getSocialLikes(), $keys_resource[4] => $this->getSocialDislikes(), $keys_resource[5] => $this->getSocialComments(), $keys_resource[6] => $this->getSocialFavourites(), $keys_resource[7] => $this->getSocialRecommendations());
     if ($result[$keys[11]] instanceof \DateTime) {
         $result[$keys[11]] = $result[$keys[11]]->format('c');
     }
     if ($result[$keys[12]] instanceof \DateTime) {
         $result[$keys[12]] = $result[$keys[12]]->format('c');
     }
     $virtualColumns = $this->virtualColumns;
     foreach ($virtualColumns as $key => $virtualColumn) {
         $result[$key] = $virtualColumn;
     }
     if ($includeForeignObjects) {
         if (null !== $this->aCategory) {
             switch ($keyType) {
                 case TableMap::TYPE_CAMELNAME:
                     $key = 'category';
                     break;
                 case TableMap::TYPE_FIELDNAME:
                     $key = 'category';
                     break;
                 default:
                     $key = 'Category';
             }
             $result[$key] = $this->aCategory->toArray($keyType, $includeLazyLoadColumns, $alreadyDumpedObjects, true);
         }
         if (null !== $this->aProvider) {
             switch ($keyType) {
                 case TableMap::TYPE_CAMELNAME:
                     $key = 'provider';
                     break;
                 case TableMap::TYPE_FIELDNAME:
                     $key = 'provider';
                     break;
                 default:
                     $key = 'Provider';
             }
             $result[$key] = $this->aProvider->toArray($keyType, $includeLazyLoadColumns, $alreadyDumpedObjects, true);
         }
         if (null !== $this->aUnit) {
             switch ($keyType) {
                 case TableMap::TYPE_CAMELNAME:
                     $key = 'unit';
                     break;
                 case TableMap::TYPE_FIELDNAME:
                     $key = 'unit';
                     break;
                 default:
                     $key = 'Unit';
             }
             $result[$key] = $this->aUnit->toArray($keyType, $includeLazyLoadColumns, $alreadyDumpedObjects, true);
         }
         if (null !== $this->aFile) {
             switch ($keyType) {
                 case TableMap::TYPE_CAMELNAME:
                     $key = 'file';
                     break;
                 case TableMap::TYPE_FIELDNAME:
                     $key = 'file';
                     break;
                 default:
                     $key = 'File';
             }
             $result[$key] = $this->aFile->toArray($keyType, $includeLazyLoadColumns, $alreadyDumpedObjects, true);
         }
         if (null !== $this->aResource) {
             switch ($keyType) {
                 case TableMap::TYPE_CAMELNAME:
                     $key = 'resource';
                     break;
                 case TableMap::TYPE_FIELDNAME:
                     $key = 'resource';
                     break;
                 default:
                     $key = 'Resource';
             }
             $result[$key] = $this->aResource->toArray($keyType, $includeLazyLoadColumns, $alreadyDumpedObjects, true);
         }
         if (null !== $this->collOrderProducts) {
             switch ($keyType) {
                 case TableMap::TYPE_CAMELNAME:
                     $key = 'orderProducts';
                     break;
                 case TableMap::TYPE_FIELDNAME:
                     $key = 'order_products';
                     break;
                 default:
                     $key = 'OrderProducts';
             }
             $result[$key] = $this->collOrderProducts->toArray(null, false, $keyType, $includeLazyLoadColumns, $alreadyDumpedObjects);
         }
         if (null !== $this->collProductHighlighteds) {
             switch ($keyType) {
                 case TableMap::TYPE_CAMELNAME:
                     $key = 'productHighlighteds';
                     break;
                 case TableMap::TYPE_FIELDNAME:
                     $key = 'product_highlighteds';
                     break;
                 default:
                     $key = 'ProductHighlighteds';
             }
             $result[$key] = $this->collProductHighlighteds->toArray(null, false, $keyType, $includeLazyLoadColumns, $alreadyDumpedObjects);
         }
         if (null !== $this->collProductVariationTypes) {
             switch ($keyType) {
                 case TableMap::TYPE_CAMELNAME:
                     $key = 'productVariationTypes';
                     break;
                 case TableMap::TYPE_FIELDNAME:
                     $key = 'product_variation_types';
                     break;
                 default:
                     $key = 'ProductVariationTypes';
             }
             $result[$key] = $this->collProductVariationTypes->toArray(null, false, $keyType, $includeLazyLoadColumns, $alreadyDumpedObjects);
         }
         if (null !== $this->collWishlistProducts) {
             switch ($keyType) {
                 case TableMap::TYPE_CAMELNAME:
                     $key = 'wishlistProducts';
                     break;
                 case TableMap::TYPE_FIELDNAME:
                     $key = 'wishlist_products';
                     break;
                 default:
                     $key = 'WishlistProducts';
             }
             $result[$key] = $this->collWishlistProducts->toArray(null, false, $keyType, $includeLazyLoadColumns, $alreadyDumpedObjects);
         }
     }
     return $result;
 }