Bug #4317
Still Problems with SplObjectStorage duplicates
Status: | Resolved | Start date: | 2009-08-25 | |
---|---|---|---|---|
Priority: | Should have | Due date: | ||
Assigned To: | Karsten Dambekalns | % Done: | 100% |
|
Category: | FLOW3 Persistence | |||
Target version: | - |
Description
My Version is Revision r3094
There are still problems with the SplObjectStorage duplicates (Issue #3819).
I have attached my script. In addition, the blog model must be expanded.
Step1:
creating a Blog
creating a Post1
creating a Post2
add Post1 to Blog
Step2:
add Post2 to Blog
Step3
detach Post1 from Blog
Associated revisions
[+BUGFIX] TYPO3CR (FLOW3 Persistence): fixes to storing arrays and SplObjectStorage properties, fixes #4317.
[~TASK] TYPO3CR (FLOW3 Persistence): some tweaks to DataMapper and storage search classes.
History
#1 Updated by Tommy Seus almost 6 years ago
- File Backend.php added
Hello, I tried to find a solution. In the initial state will always generate a ItemNode without checking to see if it already exists. My modification performs this check and this triggers the problem of duplicate entries when adding (ATTACH).
Removing (DETACH) of objects is more complicated. Here are 2 lists "compared". Once the new list, ahead of objects are removed. In the second list, the database objects are stored. If in the first list an item missing, this will be deleted from the second.
I hope this solution inspires you.
#2 Updated by Karsten Dambekalns almost 6 years ago
- Category set to FLOW3 Persistence
- Status changed from New to Accepted
- Assigned To set to Karsten Dambekalns
#3 Updated by Karsten Dambekalns almost 6 years ago
- Status changed from Accepted to Resolved
- % Done changed from 0 to 100
Applied in changeset r3328.