Skip to content

ZF2 module to add support for the Sqlsrv types "datetime" and "date" in doctrine2

Notifications You must be signed in to change notification settings

maegnes/ZF2Doctrine2SqlsrvTypes

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

14 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Build Status

ZF2Doctrine2SqlsrvTypes

If you are working with Microsoft MSSQL and its "Sqlsrv"-Driver with Zend Framework2 and Doctrine2 you will have some troubles with the "datetime" and "date" types in Doctrine2. The MSSQL-Server doesn't accept the defined standard format "Y-m-D H:i:s" or "Y-m-D" in Doctrine2.

To avoid problems with the format use the ZF2Doctrine2SqlsrvTypes module which integrates the two new DBAL Types SqlsrvDatetime and SqlsrvDate.

After installing the module via composer just replace the types in your doctrine2 notation from "datetime" to "SqlsrvDatetime" and from "date" to "SqlsrvDate".

Installation via Composer

Just add the following dependency to your composer.json file and add the module "ZF2Doctrine2SqlsrvTypes" to your modules list in the application.config.php.

{
    "require": {
		"maegnes/zf2doctrine2sqlsrv": "dev-master"
    }
}

About

ZF2 module to add support for the Sqlsrv types "datetime" and "date" in doctrine2

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages