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?
> -----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?
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.
> 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
Perhaps it makes sense to define all of those methods as "final", to
prevent anyone from accidentally overriding them in child classes.
From: doctrine-dev@googlegroups.com [mailto:doctrine-dev@googlegroups.com]
On Behalf Of Jonathan Wage
Sent: Monday, June 22, 2009 3:37 PM
To: doctrine-dev@googlegroups.com
Subject: [doctrine-dev] Re: 1.2 - resolving the conflict between auto
accessors and Doctrine_Record's methods
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.
> -----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
That wouldn't solve any problems because if you define a column that matches
one of the getters and you have auto accessor override enable, it will
invoke that method for the property instead of calling the normal get()
adam.hutt...@fracturedatlas.org> wrote:
> Perhaps it makes sense to define all of those methods as “final”, to
> prevent anyone from accidentally overriding them in child classes.
> *From:* doctrine-dev@googlegroups.com [mailto:
> doctrine-dev@googlegroups.com] *On Behalf Of *Jonathan Wage
> *Sent:* Monday, June 22, 2009 3:37 PM
> *To:* doctrine-dev@googlegroups.com
> *Subject:* [doctrine-dev] Re: 1.2 - resolving the conflict between auto
> accessors and Doctrine_Record's methods
> 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
-- 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
> That wouldn't solve any problems because if you define a column that matches
> one of the getters and you have auto accessor override enable, it will
> invoke that method for the property instead of calling the normal get()
> - Jon
> On Mon, Jun 22, 2009 at 2:39 PM, Adam Huttler <
> adam.hutt...@fracturedatlas.org> wrote:
> > Perhaps it makes sense to define all of those methods as “final”, to
> > prevent anyone from accidentally overriding them in child classes.
> > *From:* doctrine-dev@googlegroups.com [mailto:
> > doctrine-dev@googlegroups.com] *On Behalf Of *Jonathan Wage
> > *Sent:* Monday, June 22, 2009 3:37 PM
> > *To:* doctrine-dev@googlegroups.com
> > *Subject:* [doctrine-dev] Re: 1.2 - resolving the conflict between auto
> > accessors and Doctrine_Record's methods
> > 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
> --
> 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
> So the only option is to clarify doctrine docs in section about AAO
> with a warning and "symfony+doctrine" docs that man mustn't use some
> fieldnames.
> - JJ
> On 22 Cze, 21:53, Jonathan Wage <jonw...@gmail.com> wrote:
> > That wouldn't solve any problems because if you define a column that
> matches
> > one of the getters and you have auto accessor override enable, it will
> > invoke that method for the property instead of calling the normal get()
> > - Jon
> > On Mon, Jun 22, 2009 at 2:39 PM, Adam Huttler <
> > adam.hutt...@fracturedatlas.org> wrote:
> > > Perhaps it makes sense to define all of those methods as “final”, to
> > > prevent anyone from accidentally overriding them in child classes.
> > > *From:* doctrine-dev@googlegroups.com [mailto:
> > > doctrine-dev@googlegroups.com] *On Behalf Of *Jonathan Wage
> > > *Sent:* Monday, June 22, 2009 3:37 PM
> > > *To:* doctrine-dev@googlegroups.com
> > > *Subject:* [doctrine-dev] Re: 1.2 - resolving the conflict between auto
> > > accessors and Doctrine_Record's methods
> > > 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?
> > > 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
> > --
> > 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
-- 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