Project

General

Profile

Actions

Feature #21560

closed

sql_query does not respect "mapping"

Added by Steffen Ritter about 15 years ago. Updated almost 15 years ago.

Status:
Closed
Priority:
Should have
Category:
Database API (Doctrine DBAL)
Target version:
-
Start date:
2009-11-16
Due date:
% Done:

0%

Estimated time:
PHP Version:
Tags:
Complexity:
Sprint Focus:

Description

The sql_query function of DBAL does not respect the Mapping feature of DBAL.

Solution: parse the SQL String and Map Query to exec_* functions

Probably a depreciationlog entry should be written so that authors of extensions get informed they should use exec_*
(issue imported from #M12603)


Files

12603.diff (3.86 KB) 12603.diff Administrator Admin, 2009-11-16 10:22
Actions #1

Updated by Xavier Perseguers about 15 years ago

Even if this method is marked as deprecated since TYPO3 4.1 in DBAL, it overrides a method (from t3lib_db) that is not deprecated at all.

The phpDoc says that it only works for _DEFAULT handler and as such extension authors are properly warned.

However this method is quite handy too and heavily used by Extbase.

I propose to change the phpDoc to say that proper support of queries is experimental (as I cannot ensure it will work all the time), remove the @deprecated phpDoc comment and add support to try to automatically transfer query handling to exec_* methods, just as it should be done to ensure proper handling by DBAL.

If query cannot be parsed, it will simply fall-back to current behavior which is to execute the query with the _DEFAULT handler.

Please test the patch and report here if it works. In case it's OK, I'll commit it tonight to DBAL-trunk.

Actions #2

Updated by Steffen Ritter about 15 years ago

+1 by reading
will test later, that the "SELECT" part works we proved already yesterday evening.
For insert and update I'll have to create a test....

regards

Steffen

Actions #3

Updated by Xavier Perseguers about 15 years ago

FYI, this patch won't be part of branch DBAL_1-0 (TYPO3 4.3.x). Once tested it will be commited to trunk to be hopefully part of TYPO3 4.4.

Actions #4

Updated by Xavier Perseguers almost 15 years ago

Committed to DBAL trunk as revision 28106

Actions

Also available in: Atom PDF