JeffreyWay / Laravel-Test-Helpers

Easier testing in Laravel.
https://packagist.org/packages/way/laravel-test-helpers
217 stars 40 forks source link

Assigning null to 'id' attribute causes PostgreSQL to throw Not Null violation #62

Open dor-denis opened 10 years ago

dor-denis commented 10 years ago

When using Factory::make or Factory::create null value is being assigned to 'id' attribute of object. When the query is being generated it looks like INSERT INTO ('id' ...) VALUES (null, ...) which causes Not Null violation. I have to add if($key == 'id') continue; to line 254 of Factory.php to make my tests work.