I have a User
model
that contains some properties-let's say firstName
and
lastName
-but in my database I store them as first_name
and
last_name
.
inside User
Form
I use a hydrator like so:
$this->setHydrator(new ClassMethods(true));
The debug shows:
array(5) {
["firstName"] => string(13) "my first name"
["lastName"] => string(12) "my last name"
...
}
Why do the array keys not match the database columns, even I use $this->setHydrator(new ClassMethods(true));
?