Ejemplo n.º 1
0
 /**
  * Reloads this object from datastore based on primary key and (optionally) resets all associated objects.
  *
  * This will only work if the object has been saved and has a valid primary key set.
  *
  * @param      boolean $deep (optional) Whether to also de-associated any related objects.
  * @param      PropelPDO $con (optional) The PropelPDO connection to use.
  * @return     void
  * @throws     PropelException - if this object is deleted, unsaved or doesn't have pk match in db
  */
 public function reload($deep = false, PropelPDO $con = null)
 {
     if ($this->isDeleted()) {
         throw new PropelException("Cannot reload a deleted object.");
     }
     if ($this->isNew()) {
         throw new PropelException("Cannot reload an unsaved object.");
     }
     if ($con === null) {
         $con = Propel::getConnection(UserPeer::DATABASE_NAME, Propel::CONNECTION_READ);
     }
     // We don't need to alter the object instance pool; we're just modifying this instance
     // already in the pool.
     $stmt = UserPeer::doSelectStmt($this->buildPkeyCriteria(), $con);
     $row = $stmt->fetch(PDO::FETCH_NUM);
     $stmt->closeCursor();
     if (!$row) {
         throw new PropelException('Cannot find matching row in the database to reload object values.');
     }
     $this->hydrate($row, 0, true);
     // rehydrate
     if ($deep) {
         // also de-associate any related objects?
     }
     // if (deep)
 }
Ejemplo n.º 2
0
 /**
  * Method to do selects.
  *
  * @param      Criteria $criteria The Criteria object used to build the SELECT statement.
  * @param      PropelPDO $con
  * @return     array Array of selected Objects
  * @throws     PropelException Any exceptions caught during processing will be
  *		 rethrown wrapped into a PropelException.
  */
 public static function doSelect(Criteria $criteria, PropelPDO $con = null)
 {
     return UserPeer::populateObjects(UserPeer::doSelectStmt($criteria, $con));
 }
Ejemplo n.º 3
0
 /**
  * Reloads this object from datastore based on primary key and (optionally) resets all associated objects.
  *
  * This will only work if the object has been saved and has a valid primary key set.
  *
  * @param      boolean $deep (optional) Whether to also de-associated any related objects.
  * @param      PropelPDO $con (optional) The PropelPDO connection to use.
  * @return     void
  * @throws     PropelException - if this object is deleted, unsaved or doesn't have pk match in db
  */
 public function reload($deep = false, PropelPDO $con = null)
 {
     if ($this->isDeleted()) {
         throw new PropelException("Cannot reload a deleted object.");
     }
     if ($this->isNew()) {
         throw new PropelException("Cannot reload an unsaved object.");
     }
     if ($con === null) {
         $con = Propel::getConnection(UserPeer::DATABASE_NAME, Propel::CONNECTION_READ);
     }
     // We don't need to alter the object instance pool; we're just modifying this instance
     // already in the pool.
     $stmt = UserPeer::doSelectStmt($this->buildPkeyCriteria(), $con);
     $row = $stmt->fetch(PDO::FETCH_NUM);
     $stmt->closeCursor();
     if (!$row) {
         throw new PropelException('Cannot find matching row in the database to reload object values.');
     }
     $this->hydrate($row, 0, true);
     // rehydrate
     if ($deep) {
         // also de-associate any related objects?
         $this->collExperts = null;
         $this->lastExpertCriteria = null;
         $this->collExpertCategorys = null;
         $this->lastExpertCategoryCriteria = null;
         $this->collHistorys = null;
         $this->lastHistoryCriteria = null;
         $this->collItemRatings = null;
         $this->lastItemRatingCriteria = null;
         $this->collOfferVoucher1s = null;
         $this->lastOfferVoucher1Criteria = null;
         $this->collPurchaseDetails = null;
         $this->lastPurchaseDetailCriteria = null;
         $this->collShoppingCarts = null;
         $this->lastShoppingCartCriteria = null;
         $this->collShoutsRelatedByPosterId = null;
         $this->lastShoutRelatedByPosterIdCriteria = null;
         $this->collShoutsRelatedByRecipientId = null;
         $this->lastShoutRelatedByRecipientIdCriteria = null;
         $this->collUserAwardss = null;
         $this->lastUserAwardsCriteria = null;
         $this->singleUserGtalk = null;
         $this->singleUserFb = null;
         $this->collUserRates = null;
         $this->lastUserRateCriteria = null;
         $this->singleUserTutor = null;
         $this->collUserQuestionTags = null;
         $this->lastUserQuestionTagCriteria = null;
         $this->collStudentQuestionsRelatedByStudentId = null;
         $this->lastStudentQuestionRelatedByStudentIdCriteria = null;
         $this->collStudentQuestionsRelatedByTutorId = null;
         $this->lastStudentQuestionRelatedByTutorIdCriteria = null;
         $this->collWhiteboardSessions = null;
         $this->lastWhiteboardSessionCriteria = null;
     }
     // if (deep)
 }
Ejemplo n.º 4
0
 /**
  * Reloads this object from datastore based on primary key and (optionally) resets all associated objects.
  *
  * This will only work if the object has been saved and has a valid primary key set.
  *
  * @param      boolean $deep (optional) Whether to also de-associated any related objects.
  * @param      PropelPDO $con (optional) The PropelPDO connection to use.
  * @return     void
  * @throws     PropelException - if this object is deleted, unsaved or doesn't have pk match in db
  */
 public function reload($deep = false, PropelPDO $con = null)
 {
     if ($this->isDeleted()) {
         throw new PropelException("Cannot reload a deleted object.");
     }
     if ($this->isNew()) {
         throw new PropelException("Cannot reload an unsaved object.");
     }
     if ($con === null) {
         $con = Propel::getConnection(UserPeer::DATABASE_NAME, Propel::CONNECTION_READ);
     }
     // We don't need to alter the object instance pool; we're just modifying this instance
     // already in the pool.
     $stmt = UserPeer::doSelectStmt($this->buildPkeyCriteria(), $con);
     $row = $stmt->fetch(PDO::FETCH_NUM);
     $stmt->closeCursor();
     if (!$row) {
         throw new PropelException('Cannot find matching row in the database to reload object values.');
     }
     $this->hydrate($row, 0, true);
     // rehydrate
     if ($deep) {
         // also de-associate any related objects?
         $this->collMessagesRelatedByRecipientId = null;
         $this->lastMessageRelatedByRecipientIdCriteria = null;
         $this->collMessagesRelatedBySenderId = null;
         $this->lastMessageRelatedBySenderIdCriteria = null;
         $this->collMessagesRelatedByOwnerId = null;
         $this->lastMessageRelatedByOwnerIdCriteria = null;
         $this->collReservations = null;
         $this->lastReservationCriteria = null;
         $this->collReservationOtherMemberss = null;
         $this->lastReservationOtherMembersCriteria = null;
         $this->collSubscriptions = null;
         $this->lastSubscriptionCriteria = null;
         $this->collUsergroupHasChiefs = null;
         $this->lastUsergroupHasChiefCriteria = null;
         $this->collUsergroupHasUsers = null;
         $this->lastUsergroupHasUserCriteria = null;
         $this->collUserHasRoles = null;
         $this->lastUserHasRoleCriteria = null;
     }
     // if (deep)
 }
Ejemplo n.º 5
0
 /**
  * Reloads this object from datastore based on primary key and (optionally) resets all associated objects.
  *
  * This will only work if the object has been saved and has a valid primary key set.
  *
  * @param boolean $deep (optional) Whether to also de-associated any related objects.
  * @param PropelPDO $con (optional) The PropelPDO connection to use.
  * @return void
  * @throws PropelException - if this object is deleted, unsaved or doesn't have pk match in db
  */
 public function reload($deep = false, PropelPDO $con = null)
 {
     if ($this->isDeleted()) {
         throw new PropelException("Cannot reload a deleted object.");
     }
     if ($this->isNew()) {
         throw new PropelException("Cannot reload an unsaved object.");
     }
     if ($con === null) {
         $con = Propel::getConnection(UserPeer::DATABASE_NAME, Propel::CONNECTION_READ);
     }
     // We don't need to alter the object instance pool; we're just modifying this instance
     // already in the pool.
     $stmt = UserPeer::doSelectStmt($this->buildPkeyCriteria(), $con);
     $row = $stmt->fetch(PDO::FETCH_NUM);
     $stmt->closeCursor();
     if (!$row) {
         throw new PropelException('Cannot find matching row in the database to reload object values.');
     }
     $this->hydrate($row, 0, true);
     // rehydrate
     if ($deep) {
         // also de-associate any related objects?
         $this->aLanguageRelatedByLanguageId = null;
         $this->collUserGroupsRelatedByUserId = null;
         $this->collUserRolesRelatedByUserId = null;
         $this->collDocumentsRelatedByOwnerId = null;
         $this->collLinksRelatedByOwnerId = null;
         $this->collPagesRelatedByCreatedBy = null;
         $this->collPagesRelatedByUpdatedBy = null;
         $this->collPagePropertysRelatedByCreatedBy = null;
         $this->collPagePropertysRelatedByUpdatedBy = null;
         $this->collPageStringsRelatedByCreatedBy = null;
         $this->collPageStringsRelatedByUpdatedBy = null;
         $this->collContentObjectsRelatedByCreatedBy = null;
         $this->collContentObjectsRelatedByUpdatedBy = null;
         $this->collLanguageObjectsRelatedByCreatedBy = null;
         $this->collLanguageObjectsRelatedByUpdatedBy = null;
         $this->collLanguageObjectHistorysRelatedByCreatedBy = null;
         $this->collLanguageObjectHistorysRelatedByUpdatedBy = null;
         $this->collLanguagesRelatedByCreatedBy = null;
         $this->collLanguagesRelatedByUpdatedBy = null;
         $this->collTranslationsRelatedByCreatedBy = null;
         $this->collTranslationsRelatedByUpdatedBy = null;
         $this->collUserGroupsRelatedByCreatedBy = null;
         $this->collUserGroupsRelatedByUpdatedBy = null;
         $this->collGroupsRelatedByCreatedBy = null;
         $this->collGroupsRelatedByUpdatedBy = null;
         $this->collGroupRolesRelatedByCreatedBy = null;
         $this->collGroupRolesRelatedByUpdatedBy = null;
         $this->collRolesRelatedByCreatedBy = null;
         $this->collRolesRelatedByUpdatedBy = null;
         $this->collUserRolesRelatedByCreatedBy = null;
         $this->collUserRolesRelatedByUpdatedBy = null;
         $this->collRightsRelatedByCreatedBy = null;
         $this->collRightsRelatedByUpdatedBy = null;
         $this->collDocumentsRelatedByCreatedBy = null;
         $this->collDocumentsRelatedByUpdatedBy = null;
         $this->collDocumentDatasRelatedByCreatedBy = null;
         $this->collDocumentDatasRelatedByUpdatedBy = null;
         $this->collDocumentTypesRelatedByCreatedBy = null;
         $this->collDocumentTypesRelatedByUpdatedBy = null;
         $this->collDocumentCategorysRelatedByCreatedBy = null;
         $this->collDocumentCategorysRelatedByUpdatedBy = null;
         $this->collTagsRelatedByCreatedBy = null;
         $this->collTagsRelatedByUpdatedBy = null;
         $this->collTagInstancesRelatedByCreatedBy = null;
         $this->collTagInstancesRelatedByUpdatedBy = null;
         $this->collLinksRelatedByCreatedBy = null;
         $this->collLinksRelatedByUpdatedBy = null;
         $this->collLinkCategorysRelatedByCreatedBy = null;
         $this->collLinkCategorysRelatedByUpdatedBy = null;
         $this->collReferencesRelatedByCreatedBy = null;
         $this->collReferencesRelatedByUpdatedBy = null;
     }
     // if (deep)
 }