[TYPO3-mvc] Can't find floating objects
Christoph Koehler
christoph.koehler at gmail.com
Mon Aug 24 19:08:54 CEST 2009
Hello,
Scenario: Fetch an object from the db using findBy*, if none exists,
create one. Repeat this several times.
Expected: The object isn't found the first iteration, is created and
used. The next iteration will find the object that was created
previously and use it instead of creating a new one.
Actual: The object isn't found the first iteration, is created and used.
The next iteration does _NOT_ find the previously created object and
create another new one with the same attributes as the first one. This
will be done for each iteration until everything is saved to the db. The
result is many objects that share attributes.
Fix: Either enable the find* methods to search objects that have not yet
been committed to the db, or save objects more often to the db.
Workaround?: Is there a way to manually save all floating objects into
the db? If so, how?
Thanks!
Christoph
More information about the TYPO3-project-typo3v4mvc
mailing list