Commit e62d04f
Make sure that the primary key is stored in lowercase
Often, developers set the column names in different cases for the $primary_key static field in the Model. However, the object for the Model stores column names as lowercase (in $attributes). This causes confusion at times (for example, when checking if "$attributes[$pk]" is set while inserting a new record).
This small bit of code makes sure no matter what case the developer sets his primary key ("myPrimaryKey" or "myprimaryKey"), the key will always be stored in all lowercase ("myprimarykey").1 parent e9c5539 commit e62d04f
1 file changed
+2
-0
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
457 | 457 | | |
458 | 458 | | |
459 | 459 | | |
| 460 | + | |
| 461 | + | |
460 | 462 | | |
461 | 463 | | |
462 | 464 | | |
| |||
0 commit comments