I'm still a bit confused by how the following works:
your table name would be "people"
class Person extends ActiveRecord\Model {}
So thats what i did with my table: posts
.
class Post extends ActiveRecord\Model{}
At no point did I have to specify Post
is actually equal to the table posts
. So where/how does this magic happen? How would I override it if need be?
What about in instances like:
class fish = table fish
class goose = table geese
Thanks
Use the static $table_name
in your model, see php-AR conventions.