Thanks but as about 3. I tought it is doctrine related! Does doctrine
escape the passed value before inserting? Or this is my job to escape it
before passing to insert?
در 2014 2 18 14:48، "Herman Peeren" <[email protected]> نوشت:

> *sigh*
> 1. nonsense: entities are just not public; can thus be protected or
> private.
> 2. not Doctrine-related question: it's up to you and how you model things.
> 3. not Doctrine-related. Doctrine maps between your entities and the
> database. Whatever you put in your entities is none of Doctrine's business.
> Doctrine doesn't know anything about request variables etc.
>
> On Tuesday, 18 February 2014 14:11:08 UTC+1, Parsifal wrote:
>>
>> I'll try it later. But about flush/insert:
>> In entities i've added
>> private $blah;
>> for all mapped properties as stated on wiki. Now i am adding
>> SetBlah
>> $this->blah
>> for using flush to insert them into db, as stated in wiki they should be
>> protected.
>> So i should have
>> private $blah;
>> protected $blah;
>> Of course this is not possible, i think i should choose either private or
>> protected for both purposes? Please advice.
>>
>> 2) how about using
>> $this->$key = $value;
>> in a foreach to set all of $_POST at once rather than setting them one by
>> one? Or not recommended?
>>
>> 3) escaping $_POST is my job to do for sql injection or doctrine will
>> care of anything?
>>
>  --
> You received this message because you are subscribed to the Google Groups
> "doctrine-user" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to [email protected].
> To post to this group, send email to [email protected].
> Visit this group at http://groups.google.com/group/doctrine-user.
> For more options, visit https://groups.google.com/groups/opt_out.
>

-- 
You received this message because you are subscribed to the Google Groups 
"doctrine-user" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/doctrine-user.
For more options, visit https://groups.google.com/groups/opt_out.

Reply via email to