Project

General

Profile

Actions

Bug #76993

closed

Getting a single extbase query result in a workspace for a relation that has been deleted and re-added returns no relation

Added by Erik Frister almost 8 years ago. Updated over 2 years ago.

Status:
Closed
Priority:
Should have
Assignee:
-
Category:
Workspaces
Target version:
-
Start date:
2016-07-08
Due date:
% Done:

100%

Estimated time:
TYPO3 Version:
6.2
PHP Version:
Tags:
Complexity:
Is Regression:
No
Sprint Focus:

Description

This issue is a problem specifically when a domain model entity contains a relation to a single foreign object, and that relation is removed and a new one is added, all while in the workspace.

To reproduce (example):
  • I have a domain model entity "Blog Entry" that contains a single "Author" object.
  • I switch to a workspace
  • I delete the existing author, create a new one and assign that author to the "Blog Entry" that had the deleted author
  • After using "findAll" to get all blog entries, the blog entry above does have NULL as it's author (when previewing in the frontend)

The problem:
Author is a relation that is being mapped to an object by TYPO3 inside the DataMapper. As author is a single relation, the query is set to "LIMIT 1". However, the "first" author in this scenario is the deleted author. It is being found by the query and then later discarded via the Backend->doLanguageAndWorkspaceOverlay. Which is why I get NULL as the result. The query should get ALL results, do the overlay and then return the first only, without using the LIMIT in the query - at least as long as the workspace overlay is being done after the initial query.


Related issues 1 (0 open1 closed)

Related to TYPO3 Core - Bug #89456: Translations of IRRE Extbase Records in Workspaces not savedClosed2019-10-18

Actions
Actions

Also available in: Atom PDF