[TYPO3-mvc] Problems with property "order"

Lorenz Ulrich lorenz-typo3 at visol.ch
Thu Dec 1 15:58:39 CET 2011


Hi there

As far as I can tell this is no Extbase bug at all. TYPO3 normally does 
not quote field names and table names in queries, I think (but I'm not 
sure) because of DBAL compatibility.

So you won't be able to use MySQL reserved words [1] when you're using 
TYPO3 DB API (no matter if you use Extbase, or pibase etc.). The 
Extension Builder throws a warning if you try to add such a field and in 
the old Kickstarter you will find the list of reserved word at the 
bottom of the field setup step.

Daniel's workaround won't work because in the end you will still have 
queries like

SELECT * FROM tx_myext_table WHERE order=23;

Best regards,

Lorenz

[1] http://dev.mysql.com/doc/refman/5.5/en/reserved-words.html

Am 01.12.2011 09:38, schrieb Simon Schaufelberger:
 > i would make a bug report since this really seems like an extbase bug.
 >
 > Am 01.12.2011 09:24, schrieb Daniel Schöne:
 >> Hi Martin,
 >>
 >> this topic came up in the list a while ago... IIRC you can keep your
 >> model by renaming the SQL and use a TyposScript setup like
 >>
 >> 
plugin.tx_myext.persistence.classes.Tx_MyExt_Domain_Model_Foo.mapping.columns
 >> {
 >>      prefixorder.mapOnProperty = order
 >> }
 >>
 >> cheers,
 >> daniel
 >>
 >> On 11/30/2011 01:54 PM, Martin Ernst wrote:
 >>>
 >>> Am 30.11.2011 13:36, schrieb Georg Ringer:
 >>>> Hi,
 >>>>
 >>>> and why not just use a different name?
 >>>
 >>> Because it is "too late". I hoped I could do it without renaming, but I
 >>> will do it now.
 >>>
 >>> Thanks
 >>> Martin
 >>>
 >>> _______________________________________________
 >>> TYPO3-project-typo3v4mvc mailing list
 >>> TYPO3-project-typo3v4mvc at lists.typo3.org
 >>> 
http://lists.typo3.org/cgi-bin/mailman/listinfo/typo3-project-typo3v4mvc
 >>>
 >>
 >



More information about the TYPO3-project-typo3v4mvc mailing list