[TYPO3-mvc] How to compare a DateTime object	correctlyinanExtbase query?
    Jan Kornblum 
    jan.kornblum at gmx.de
       
    Mon Jan 12 18:46:56 CET 2015
    
    
  
Hi Stefan,
> Well, I didn't expect anybody to use the native datetime mechanism except 
> those dbal guys :)
Oh, nobody told me before ;)
> If your mysql column is "datetime", then using \DateTime objects without 
> ->format() should result in "Y-m-d H:i:s" instead of a unix timestamp. So 2. 
> shows some configuration error.
>
> Did you miss the "dbType = 'datetime'" configuration?
No, i didn't miss it.
But: The DB column is called "date_published". In the queries i use it 
spelled "datePublished" (->setOrderings() and ->greaterThen()). Both 
seems to work, but might this cause problems?
> Where does this native datetime colum come from? Did you introduce it 
> manually or is this the result of the current extension builder?
Latest extension builder...
> The difference between TYPO3\CMS\Extbase\Persistence\Generic\BackendInterface 
> and TYPO3\CMS\Extbase\Persistence\Generic\Storage\BackendInterface still 
> confuses me a little :).
Too much for me at the moment :(
> The Generic\Backend (which implements the Generic\BackendInterface) is aware 
> of the dbType configuration. The Generic\Storage\Typo3DbBackend (which 
> implements the Generic\Storage\BackendInterface) is *not* aware of the dbType 
> configuration.
>
> Both have a *::getPlainValue() method where the dbType aware magic happens 
> ... or not.
>
> Could you quickly break point both *::getPlainValue() methods and show which 
> of those is used?
I must confess that i didn't use xdebug or similar things in netbeans 
yet.
Kind regards, Jan
    
    
More information about the TYPO3-project-typo3v4mvc
mailing list