Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

My fields are being replaced #433

Open
heremiguel opened this issue Sep 22, 2016 · 0 comments
Open

My fields are being replaced #433

heremiguel opened this issue Sep 22, 2016 · 0 comments

Comments

@heremiguel
Copy link

Hi all, I have got a problem when I create a record using:

use League\FactoryMuffin\Faker\Facade as Faker;

$fm = new FactoryMuffin();
$fm->loadFactories(__DIR__ . '/factories');

$fm->define('Partner')->setDefinitions([
    'Partner'=> 'Partner Name',
    'CreatedAt'=> '2015-10-25 00:00:00',
    'UpdatedAt'=> '2015-10-25 00:00:00',
    'Status'=> 1,
    'Email'=> Faker::email()
]);

$fm->create('Partner', []);

For any reason my columns CreatedAt and UpdatedAt are being replaced with created_at and updated_at. I don't have any code to do that

I got this error:
column not found: 1054 Unknown column 'created_at' in 'field list' (SQL: insert into Partner (Partner, **created_at**, **updated_at**, Status, Email) values (Partner Name, , abc, 2015-10-25 00:00:00, 2015-10-25 00:00:00, 1, email@test.com)

I got in my model

public $timestamps = false;

My application is working properly without any problem, that error is shown when I run phpunit and try to test the partner insert.

Anyone can help me please?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant