[TYPO3-mvc] good practise: get deleted child objects

christian oettinger christian.oettinger at gmx.de
Tue Dec 6 12:14:58 CET 2011


Hi List,

this may be a simple question but I'm stuck and want to do it right this 
time, I hope somebody helps.
I am iterating my objects and want to get a child object:

-----------

$actPart = $participations->current();
$actPart->getDoctor();
...
$participations->next();
...

-----------

When my child object is set to deleted, it is not fetched any more, so 
$actPart->getDoctor() does not get results. I also do not know how to 
get just the uid of the child (which is in the field "doctor" of my 
parent object in DB) to fetch the child manually 
(setRespectEnableFields(FALSE)).

How can I access this value or get the child even if deleted?

THANKS for any help
christian (oe)





-----------

The child object definition in the model of the parent object:

	/**
	 * Arzt
	 *
	 * @var Tx_Arztcme_Domain_Model_Doctor $doctor
	 */
	protected $doctor;

	/**
	 * Getter for doctor
	 *
	 * @return Tx_Arztcme_Domain_Model_Doctor Arzt
	 */
	public function getDoctor() {
		return $this->doctor;
	}


More information about the TYPO3-project-typo3v4mvc mailing list