Welcome Guest, Not a member yet? Register   Sign In
datamapper shorthand
#1

[eluser]dudel[/eluser]
I have datamapper model in wich i did not defined a contructor like this one
Code:
function __construct($id = NULL)
    {
        parent::__construct($id);
    }
Documentation of datamapper ORM says this
Quote:If you define a constructor, but do not pass in the $id value, you will not be able to use the shorthand:

Code:
$user = new User($user_id);

My questions is what happens if i want to use the shorthand and i do not have a constructor defined.

I will answer this but i don't know if it's good that it's happening..
It works.
I should be worried?




Theme © iAndrew 2016 - Forum software by © MyBB