[TYPO3-mvc] How to keep Domain Entity non-persistent
Thomas Allmer
at at delusionworld.com
Tue Oct 11 02:23:35 CEST 2011
hey,
extbase persists stuff only if there is a repository for it...
so do you have a file called
Classes/Domain/Repository/DemandRepository.php
if so just delete it...
but I guess your problem has nothing to do with persistence..
how do you create your demand object? with a f:form?
cheers
On 11.10.2011 01:51, g4-lisz at tonarchiv.ch wrote:
> Hi there,
>
> my problem is related to another message i wrote about two weeks ago
> ("Very strange "serialize Domain Object" error").
>
> I'm trying to realize a search filter using a
> Tx_Extbase_DomainObject_AbstractEntity "demand":
>
> class Tx_Myext_Domain_Model_Demand extends
> Tx_Extbase_DomainObject_AbstractEntity {
> /**
> * @var Tx_Myext_Domain_Model_Prop1 The demanded organization
> **/
> protected $prop1;
>
> /**
> * @var Tx_Myext_Domain_Model_Prop2 The demanded organization
> **/
> protected $prop2;
>
> [etc.]
> }
>
> A Demand Object is passed to my search form:
>
> public function indexAction(Tx_Mext_Domain_Model_Demand $demand = NULL) {
> $this->view->assign('demand', $demand);
> $this->view->assign('results',$this->someRepository->findDemanded(
> $demand));
> etc.
> }
>
> The same technique is used in some samples on the internet.
>
> It worked for a while until i added some more properties. Since then i
> get the
> "Could not serialize Domain Object Tx_Myext_Domain_Model_Demand. It is
> neither an Entity with identity properties set, nor a Value Object."
> Error.
>
> I think that this happens because extbase tries to persist the object
> after it has reached a certain size.
> The error is rised from
> Tx_Extbase_MVC_Web_Routing_UriBuilder::convertDomainObjectsToIdentityArrays()
> because the Demand object doesn't have a valid uid.
>
> How can i solve this issue?
> Is there a way to keep the Demand object volatile?
>
> Any help will be much appreciated!
> Cheers, Till
--
+---------------------------------+-----------------------------------+
| Thomas Allmer | http://www.delusionworld.com |
| E-mail: at at delusionworld.com | phone: +43 699 16217064 |
+---------------------------------+-----------------------------------+
More information about the TYPO3-project-typo3v4mvc
mailing list