Google Mail Calendar Documents Reader Web more »
Recently Visited Groups | Help | Sign in
Google Groups Home
Message from discussion 1.2 - resolving the conflict between auto accessors and Doctrine_Record's methods

View Parsed - Show only message text

Received: by 10.204.77.93 with SMTP id f29mr233007bkk.16.1245699452558;
        Mon, 22 Jun 2009 12:37:32 -0700 (PDT)
Return-Path: <jonw...@gmail.com>
Received: from mail-fx0-f221.google.com (mail-fx0-f221.google.com [209.85.220.221])
        by gmr-mx.google.com with ESMTP id 14si742120bwz.1.2009.06.22.12.37.31;
        Mon, 22 Jun 2009 12:37:31 -0700 (PDT)
Received-SPF: pass (google.com: domain of jonw...@gmail.com designates 209.85.220.221 as permitted sender) client-ip=209.85.220.221;
Authentication-Results: gmr-mx.google.com; spf=pass (google.com: domain of jonw...@gmail.com designates 209.85.220.221 as permitted sender) smtp.mail=jonw...@gmail.com; dkim=pass (test mode) header...@gmail.com
Received: by fxm21 with SMTP id 21so3332578fxm.47
        for <doctrine-dev@googlegroups.com>; Mon, 22 Jun 2009 12:37:31 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
        d=gmail.com; s=gamma;
        h=domainkey-signature:mime-version:received:in-reply-to:references
         :from:date:message-id:subject:to:content-type;
        bh=xcH89OAke73CDN5bUIJ2Ze+KmH5EEMciB31o85v+WFQ=;
        b=KzgJPTM2I0o1qJOVehh03SjqSgJ+DBnpm0EG5Wd8dW2I4R8/Usude6xM+6bvLP9Cch
         QkNuRkcsk+xpAeV6dKAE/O8j44//q/3dW3KNs7WK5nqoDGBN6M1E5Ty9bONTi4xeQGiY
         WE94opny3/2/9im8g315vmN95MRW/Nm7q942M=
DomainKey-Signature: a=rsa-sha1; c=nofws;
        d=gmail.com; s=gamma;
        h=mime-version:in-reply-to:references:from:date:message-id:subject:to
         :content-type;
        b=LR+PGKG9NxH60+U3kLEzWFfgebgJbv8lNWIZrwTIU3iWJlTHdYaNB900cMXzgEXNkH
         NLauPnir2rpYuoKO0nR0E5GQlzlma/WwWiFfOfH3ZnJvW7JrmnEUwCLIQ/+agHIA3+yb
         yjZsVIMSE5x/4aV1Cg52eGybODRCedmw98r8k=
Mime-Version: 1.0
Content-Type: multipart/alternative;
	boundary="0016364c74b7483c2c046cf50156"
Received: by 10.216.12.198 with SMTP id 48mr2317116wez.223.1245699451139; Mon, 
	22 Jun 2009 12:37:31 -0700 (PDT)
In-Reply-To: <4886778307037831618@unknownmsgid>
References: <758a4f2c-97bc-476b-ac05-2b03c1cf1cfe@l12g2000yqo.googlegroups.com> 
	<4886778307037831618@unknownmsgid>
From: Jonathan Wage <jonw...@gmail.com>
Date: Mon, 22 Jun 2009 14:37:11 -0500
Message-ID: <be85b5220906221237y47176d54tbee20cba3ea68...@mail.gmail.com>
Subject: Re: [doctrine-dev] Re: 1.2 - resolving the conflict between auto 
	accessors and Doctrine_Record's methods
To: doctrine-dev@googlegroups.com

--0016364c74b7483c2c046cf50156
Content-Type: text/plain; charset=ISO-8859-1

I don't think we have anyway to solve it. Some things are reserved since you
have to extend Doctrine_Record. And like you said renaming all these things
to not use get/set as the prefix would be too big of a BC change for a 1.x
version.

- Jon

On Mon, Jun 22, 2009 at 2:27 PM, Adam Huttler <
adam.hutt...@fracturedatlas.org> wrote:

>
> As a practical matter, you can always define custom accessors/mutators for
> just those fields. That's probably not what you're looking for, though.
>
> > -----Original Message-----
> > From: doctrine-dev@googlegroups.com [mailto:doctrine-
> > dev@googlegroups.com] On Behalf Of eXtreme
> > Sent: Monday, June 22, 2009 3:28 PM
> > To: doctrine-dev
> > Subject: [doctrine-dev] 1.2 - resolving the conflict between auto
> > accessors and Doctrine_Record's methods
> >
> >
> > Doctrine supports a cool feature called "auto accessor override".
> > AFAIR this feature wasn't planned before 1.0, that's why there is a
> > "small" problem now in 1.0 and 1.1, which is possible to be
> > (partially?) fixed in new 1.2 branch (I hope so).
> >
> > I'm talking about get* and set* functions in Doctrine_Record and
> > Doctrine_Record_Abstract. They reserve some names, which cannot be
> > used as model's fieldnames, because everything goes crazy - they
> > conflict with magic and custom get* and set* function of auto
> > accessors. I heard many complains >>why does doctrine crash when I add
> > "data" field in my model<< (for example for session storage). And
> > there is no info anywhere, that it is impossible to have "data",
> > "last" or "last_modified" fields in doctrine with auto accessors or in
> > symfony.
> >
> > I'm aware that renaming all get* and set* is a big backward
> > compatibility breaker, so I won't dare to propose that. :P Is there
> > any other way to resolve that conflict?
> >
>
> >
>


-- 
Jonathan H. Wage (+1 415 992 5468)
Open Source Software Developer & Evangelist
sensiolabs.com | jwage.com | doctrine-project.org | symfony-project.org

You can contact Jonathan about Doctrine, Symfony and Open-Source or for
training, consulting, application development, or business related questions
at jonathan.w...@sensio.com

--0016364c74b7483c2c046cf50156
Content-Type: text/html; charset=ISO-8859-1
Content-Transfer-Encoding: quoted-printable

I don&#39;t think we have anyway to solve it. Some things are reserved sinc=
e you have to extend Doctrine_Record. And like you said renaming all these =
things to not use get/set as the prefix would be too big of a BC change for=
 a 1.x version.<br>

<br>- Jon<br><br><div class=3D"gmail_quote">On Mon, Jun 22, 2009 at 2:27 PM=
, Adam Huttler <span dir=3D"ltr">&lt;<a href=3D"mailto:adam.huttler@fractur=
edatlas.org">adam.hutt...@fracturedatlas.org</a>&gt;</span> wrote:<br><bloc=
kquote class=3D"gmail_quote" style=3D"border-left: 1px solid rgb(204, 204, =
204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">

<br>
As a practical matter, you can always define custom accessors/mutators for<=
br>
just those fields. That&#39;s probably not what you&#39;re looking for, tho=
ugh.<br>
<div><div></div><div class=3D"h5"><br>
&gt; -----Original Message-----<br>
&gt; From: <a href=3D"mailto:doctrine-dev@googlegroups.com">doctrine-dev@go=
oglegroups.com</a> [mailto:<a href=3D"mailto:doctrine-">doctrine-</a><br>
&gt; <a href=3D"mailto:dev@googlegroups.com">dev@googlegroups.com</a>] On B=
ehalf Of eXtreme<br>
&gt; Sent: Monday, June 22, 2009 3:28 PM<br>
&gt; To: doctrine-dev<br>
&gt; Subject: [doctrine-dev] 1.2 - resolving the conflict between auto<br>
&gt; accessors and Doctrine_Record&#39;s methods<br>
&gt;<br>
&gt;<br>
&gt; Doctrine supports a cool feature called &quot;auto accessor override&q=
uot;.<br>
&gt; AFAIR this feature wasn&#39;t planned before 1.0, that&#39;s why there=
 is a<br>
&gt; &quot;small&quot; problem now in 1.0 and 1.1, which is possible to be<=
br>
&gt; (partially?) fixed in new 1.2 branch (I hope so).<br>
&gt;<br>
&gt; I&#39;m talking about get* and set* functions in Doctrine_Record and<b=
r>
&gt; Doctrine_Record_Abstract. They reserve some names, which cannot be<br>
&gt; used as model&#39;s fieldnames, because everything goes crazy - they<b=
r>
&gt; conflict with magic and custom get* and set* function of auto<br>
&gt; accessors. I heard many complains &gt;&gt;why does doctrine crash when=
 I add<br>
&gt; &quot;data&quot; field in my model&lt;&lt; (for example for session st=
orage). And<br>
&gt; there is no info anywhere, that it is impossible to have &quot;data&qu=
ot;,<br>
&gt; &quot;last&quot; or &quot;last_modified&quot; fields in doctrine with =
auto accessors or in<br>
&gt; symfony.<br>
&gt;<br>
&gt; I&#39;m aware that renaming all get* and set* is a big backward<br>
&gt; compatibility breaker, so I won&#39;t dare to propose that. :P Is ther=
e<br>
&gt; any other way to resolve that conflict?<br>
&gt;<br>
<br>
<br>
</div></div></blockquote></div><br><br clear=3D"all"><br>-- <br>Jonathan H.=
 Wage (+1 415 992 5468)<br>Open Source Software Developer &amp; Evangelist<=
br><a href=3D"http://sensiolabs.com">sensiolabs.com</a> | <a href=3D"http:/=
/jwage.com">jwage.com</a> | <a href=3D"http://doctrine-project.org">doctrin=
e-project.org</a> | <a href=3D"http://symfony-project.org">symfony-project.=
org</a><br>

<br>You can contact Jonathan about Doctrine, Symfony and Open-Source or for=
 training, consulting, application development, or business related questio=
ns at <a href=3D"mailto:jonathan.w...@sensio.com">jonathan.w...@sensio.com<=
/a><br>



--0016364c74b7483c2c046cf50156--


Create a group - Google Groups - Google Home - Terms of Service - Privacy Policy
©2009 Google