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

index not of right type after row creation #584

Open
CC007 opened this issue Sep 13, 2017 · 0 comments
Open

index not of right type after row creation #584

CC007 opened this issue Sep 13, 2017 · 0 comments

Comments

@CC007
Copy link

CC007 commented Sep 13, 2017

Consider the table foos:

+---+-------+
|id |  foo  |
+---+-------+
|INT|VARCHAR|
+---+-------+

If you then query using find_by_id, the result is as expected: an object (lets say $var) where $var->id is an int and $var->foo is a string

However, when creating a new row:

$var = new Foo;
$var->foo = 'bar';
$var->save();

Then $var->id is a string. I consider this unexpected behaviour and it caused me headaches until I realized that this was the case. I hope this can be fixed soon.

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