Message from discussion
1.2 - resolving the conflict between auto accessors and Doctrine_Record's methods
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'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"><<a href=3D"mailto:adam.huttler@fractur=
edatlas.org">adam.hutt...@fracturedatlas.org</a>></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's probably not what you're looking for, tho=
ugh.<br>
<div><div></div><div class=3D"h5"><br>
> -----Original Message-----<br>
> From: <a href=3D"mailto:doctrine-dev@googlegroups.com">doctrine-dev@go=
oglegroups.com</a> [mailto:<a href=3D"mailto:doctrine-">doctrine-</a><br>
> <a href=3D"mailto:dev@googlegroups.com">dev@googlegroups.com</a>] On B=
ehalf Of eXtreme<br>
> Sent: Monday, June 22, 2009 3:28 PM<br>
> To: doctrine-dev<br>
> Subject: [doctrine-dev] 1.2 - resolving the conflict between auto<br>
> accessors and Doctrine_Record's methods<br>
><br>
><br>
> Doctrine supports a cool feature called "auto accessor override&q=
uot;.<br>
> AFAIR this feature wasn't planned before 1.0, that's why there=
is a<br>
> "small" problem now in 1.0 and 1.1, which is possible to be<=
br>
> (partially?) fixed in new 1.2 branch (I hope so).<br>
><br>
> I'm talking about get* and set* functions in Doctrine_Record and<b=
r>
> Doctrine_Record_Abstract. They reserve some names, which cannot be<br>
> used as model's fieldnames, because everything goes crazy - they<b=
r>
> conflict with magic and custom get* and set* function of auto<br>
> accessors. I heard many complains >>why does doctrine crash when=
I add<br>
> "data" field in my model<< (for example for session st=
orage). And<br>
> there is no info anywhere, that it is impossible to have "data&qu=
ot;,<br>
> "last" or "last_modified" fields in doctrine with =
auto accessors or in<br>
> symfony.<br>
><br>
> I'm aware that renaming all get* and set* is a big backward<br>
> compatibility breaker, so I won't dare to propose that. :P Is ther=
e<br>
> any other way to resolve that conflict?<br>
><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 & 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--