pomm-project / ModelManager

Model Manager for the Pomm database framework.
MIT License
66 stars 27 forks source link

Non-string primary key #1

Closed sanpii closed 9 years ago

sanpii commented 9 years ago

I use a timestamp for primary key, this caused an error in \PommProject\ModelManager\Model\IdentityMapper::getSignature():

Catchable fatal error: Object of class DateTime could not be converted to string in ./vendor/pomm-project/model-manager/sources/lib/Model/IdentityMapper.php on line 46

https://github.com/pomm-project/ModelManager/blob/master/sources/lib/Model/IdentityMapper.php#L45

chanmix51 commented 9 years ago

I have to find the piece of paper saying it is a bad practice to use a timestamp as primary key ;)