Re: Selective Recursive Find

2007-12-11 Thread Adam Royle

I guess it depends on how you choose to develop. Personally I keep a
separate copy of cake for every single site that I create. This means
I don't have to worry about backwards compatibility for each site
every time I want to use a new version of cake. Some people who are
using *nix might use a technique like this:
http://realm3.com/articles/managing_multiple_versions_of_cakephp_on_linux

Each time I create a new site, I export a version from the trunk
repository in subversion. If my previous code (controllers,
behaviours, helpers, etc) doesn't work with the latest trunk I figure
out what is causing the conflict. If it's too hard to debug I just use
a previous working version (copied from another site).

If I have to modify an older site and I want some functionality that I
have in the new version, I usually just swap out the cake directory
with the latest version and then test the site thoroughly. If there
are no errors, sweet! If there are, I usually restore the previous
cake folder and see if I can get the functionality by overriding a
class, or sometimes I'll just modify the cake core libs (not generally
recommended unless you know what you're doing and don't care that it
might upset a god somewhere).

So all in all, not a very streamlined process, but as a sole developer
doing the above doesn't concern me.

Re: your comment about saving datetime fields. Not sure what
functionality you're talking about that no longer works - but it might
just work differently. Dig through the source and figure out how it
works. And yes, you do occasionally find bugs, but that's the fun of
open source - you can fix them and send a patch back to the
developers :)

Additionally, one of the first steps I do when using a new version of
cake is to bake some controllers, models and views to see if anything
major has changed. Also helps to identify new features occasionally.

Cheers,
Adam

On Dec 12, 12:52 am, Baz <[EMAIL PROTECTED]> wrote:
> Slightly.
>
> Sorry, I'm new to all of this. I just realized that I need some software to
> download from the branches.
>
> I do have a question though. What do you do when you update and stuff
> doesn't work, just roll back?
>
> For eg. Saving datetime fields to the database no longer works.
>
> On Dec 11, 2007 4:02 AM, Adam Royle <[EMAIL PROTECTED]> wrote:
>
>
>
> > Baz...
>
> > I update to the 1.2.x.x trunk every so often and use for production
> > sites. It's generally considered stable enough to use.
> >https://svn.cakephp.org/repo/trunk/cake/1.2.x.x
>
> > I also have the 1.2.x.x branch repository checked out from:
> >https://svn.cakephp.org/repo/branches/1.2.x.x
>
> > I generally only check this folder whenever I find a bug and want to
> > see if it has been fixed or not. I also use this repository it to
> > submit patches to trac.
>
> > Hope that clears things up.
>
> > Cheers,
> > Adam
>
> > On Dec 11, 1:48 am, Baz <[EMAIL PROTECTED]> wrote:
> > > I came across the bindable stuffHere's my issue though:
>
> > > With these bindables, you need and SVN version of CakePHP.
> > > - I'm still not sure how to download ONE SPECIFIC version of this (All I
> > can
> > > get is the latest nightly).
> > > - Last time I tried the nightly, it screwed up some stuff for me due to
> > some
> > > changes that I wasn't prepared for.
>
> > > On Dec 10, 2007 8:11 AM, Serge Rodovnichenko <[EMAIL PROTECTED]> wrote:
>
> > > > For Cake 1.2 take a look at Containable behaviour
> > > >http://www.thinkingphp.org/2007/06/14/containable-20-beta/orBindable
> > > > behaviour (I prefer it! :-) :http://cake-syrup.sourceforge.net/
>
> > > > For cake 1.1 search this group for keyword 'expects' :-)
>
> > > > On Dec 10, 4:24 pm, Baz <[EMAIL PROTECTED]> wrote:
> > > > > I have a simple question (I think).
>
> > > > > I have a model (Requests), which has a lot of relationships
> > including 3
> > > > > belongsTo (Equipment, Classroom, Department).
> > > > > The Classroom model has a belongsTo (Building).
>
> > > > > I'm doing a findAll/paginate in the Request controller with
> > > > > $this->Request->recursive = 1 and get MOST of what I need. However,
> > I'm
> > > > > trying to tack onto that, the Building reference.
>
> > > > > I've tried this:
> > > > > $this->Request->Classroom->recursive = 2;
>
> > > > > To just set the recursive set to 2 on the Classroom model only
> > (Doesn't
> > > > > work).
>
> > > > > I've tried doing a $this->Request->Classroom->bindModel(.)
> > > > > Doesn't work.
>
> > > > > What does work is:
> > > > > $this->Request->recursive = 2, however I get a whole recursive mess
> > on
> > > > the
> > > > > other models (Eqiupment, Department). Then I have to go unbind ALL
> > the
> > > > other
> > > > > stuff I don't need.
>
> > > > > Is there a shortcut here? I just wanna change the recursiveness on
> > ONE
> > > > > associated model.
>
> > > > > Please ask for details if I'm unclear:
> > > > > --
> > > > > Baz L
> > > > > Web Development 2.0: Web Design, CakePHP,
> > > > Javascripthttp:/

Re: Selective Recursive Find

2007-12-11 Thread Baz
Slightly.

Sorry, I'm new to all of this. I just realized that I need some software to
download from the branches.

I do have a question though. What do you do when you update and stuff
doesn't work, just roll back?

For eg. Saving datetime fields to the database no longer works.

On Dec 11, 2007 4:02 AM, Adam Royle <[EMAIL PROTECTED]> wrote:

>
> Baz...
>
> I update to the 1.2.x.x trunk every so often and use for production
> sites. It's generally considered stable enough to use.
> https://svn.cakephp.org/repo/trunk/cake/1.2.x.x
>
> I also have the 1.2.x.x branch repository checked out from:
> https://svn.cakephp.org/repo/branches/1.2.x.x
>
> I generally only check this folder whenever I find a bug and want to
> see if it has been fixed or not. I also use this repository it to
> submit patches to trac.
>
> Hope that clears things up.
>
> Cheers,
> Adam
>
> On Dec 11, 1:48 am, Baz <[EMAIL PROTECTED]> wrote:
> > I came across the bindable stuffHere's my issue though:
> >
> > With these bindables, you need and SVN version of CakePHP.
> > - I'm still not sure how to download ONE SPECIFIC version of this (All I
> can
> > get is the latest nightly).
> > - Last time I tried the nightly, it screwed up some stuff for me due to
> some
> > changes that I wasn't prepared for.
> >
> > On Dec 10, 2007 8:11 AM, Serge Rodovnichenko <[EMAIL PROTECTED]> wrote:
> >
> >
> >
> > > For Cake 1.2 take a look at Containable behaviour
> > >http://www.thinkingphp.org/2007/06/14/containable-20-beta/or Bindable
> > > behaviour (I prefer it! :-) :http://cake-syrup.sourceforge.net/
> >
> > > For cake 1.1 search this group for keyword 'expects' :-)
> >
> > > On Dec 10, 4:24 pm, Baz <[EMAIL PROTECTED]> wrote:
> > > > I have a simple question (I think).
> >
> > > > I have a model (Requests), which has a lot of relationships
> including 3
> > > > belongsTo (Equipment, Classroom, Department).
> > > > The Classroom model has a belongsTo (Building).
> >
> > > > I'm doing a findAll/paginate in the Request controller with
> > > > $this->Request->recursive = 1 and get MOST of what I need. However,
> I'm
> > > > trying to tack onto that, the Building reference.
> >
> > > > I've tried this:
> > > > $this->Request->Classroom->recursive = 2;
> >
> > > > To just set the recursive set to 2 on the Classroom model only
> (Doesn't
> > > > work).
> >
> > > > I've tried doing a $this->Request->Classroom->bindModel(.)
> > > > Doesn't work.
> >
> > > > What does work is:
> > > > $this->Request->recursive = 2, however I get a whole recursive mess
> on
> > > the
> > > > other models (Eqiupment, Department). Then I have to go unbind ALL
> the
> > > other
> > > > stuff I don't need.
> >
> > > > Is there a shortcut here? I just wanna change the recursiveness on
> ONE
> > > > associated model.
> >
> > > > Please ask for details if I'm unclear:
> > > > --
> > > > Baz L
> > > > Web Development 2.0: Web Design, CakePHP,
> > > Javascripthttp://www.WebDevelopment2.com/
> >
>

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups "Cake 
PHP" group.
To post to this group, send email to cake-php@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---



Re: Selective Recursive Find

2007-12-11 Thread Adam Royle

Baz...

I update to the 1.2.x.x trunk every so often and use for production
sites. It's generally considered stable enough to use.
https://svn.cakephp.org/repo/trunk/cake/1.2.x.x

I also have the 1.2.x.x branch repository checked out from:
https://svn.cakephp.org/repo/branches/1.2.x.x

I generally only check this folder whenever I find a bug and want to
see if it has been fixed or not. I also use this repository it to
submit patches to trac.

Hope that clears things up.

Cheers,
Adam

On Dec 11, 1:48 am, Baz <[EMAIL PROTECTED]> wrote:
> I came across the bindable stuffHere's my issue though:
>
> With these bindables, you need and SVN version of CakePHP.
> - I'm still not sure how to download ONE SPECIFIC version of this (All I can
> get is the latest nightly).
> - Last time I tried the nightly, it screwed up some stuff for me due to some
> changes that I wasn't prepared for.
>
> On Dec 10, 2007 8:11 AM, Serge Rodovnichenko <[EMAIL PROTECTED]> wrote:
>
>
>
> > For Cake 1.2 take a look at Containable behaviour
> >http://www.thinkingphp.org/2007/06/14/containable-20-beta/or Bindable
> > behaviour (I prefer it! :-) :http://cake-syrup.sourceforge.net/
>
> > For cake 1.1 search this group for keyword 'expects' :-)
>
> > On Dec 10, 4:24 pm, Baz <[EMAIL PROTECTED]> wrote:
> > > I have a simple question (I think).
>
> > > I have a model (Requests), which has a lot of relationships including 3
> > > belongsTo (Equipment, Classroom, Department).
> > > The Classroom model has a belongsTo (Building).
>
> > > I'm doing a findAll/paginate in the Request controller with
> > > $this->Request->recursive = 1 and get MOST of what I need. However, I'm
> > > trying to tack onto that, the Building reference.
>
> > > I've tried this:
> > > $this->Request->Classroom->recursive = 2;
>
> > > To just set the recursive set to 2 on the Classroom model only (Doesn't
> > > work).
>
> > > I've tried doing a $this->Request->Classroom->bindModel(.)
> > > Doesn't work.
>
> > > What does work is:
> > > $this->Request->recursive = 2, however I get a whole recursive mess on
> > the
> > > other models (Eqiupment, Department). Then I have to go unbind ALL the
> > other
> > > stuff I don't need.
>
> > > Is there a shortcut here? I just wanna change the recursiveness on ONE
> > > associated model.
>
> > > Please ask for details if I'm unclear:
> > > --
> > > Baz L
> > > Web Development 2.0: Web Design, CakePHP,
> > Javascripthttp://www.WebDevelopment2.com/
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups "Cake 
PHP" group.
To post to this group, send email to cake-php@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---



Re: Selective Recursive Find

2007-12-10 Thread Baz
I came across the bindable stuffHere's my issue though:

With these bindables, you need and SVN version of CakePHP.
- I'm still not sure how to download ONE SPECIFIC version of this (All I can
get is the latest nightly).
- Last time I tried the nightly, it screwed up some stuff for me due to some
changes that I wasn't prepared for.


On Dec 10, 2007 8:11 AM, Serge Rodovnichenko <[EMAIL PROTECTED]> wrote:

>
> For Cake 1.2 take a look at Containable behaviour
> http://www.thinkingphp.org/2007/06/14/containable-20-beta/ or Bindable
> behaviour (I prefer it! :-) : http://cake-syrup.sourceforge.net/
>
> For cake 1.1 search this group for keyword 'expects' :-)
>
> On Dec 10, 4:24 pm, Baz <[EMAIL PROTECTED]> wrote:
> > I have a simple question (I think).
> >
> > I have a model (Requests), which has a lot of relationships including 3
> > belongsTo (Equipment, Classroom, Department).
> > The Classroom model has a belongsTo (Building).
> >
> > I'm doing a findAll/paginate in the Request controller with
> > $this->Request->recursive = 1 and get MOST of what I need. However, I'm
> > trying to tack onto that, the Building reference.
> >
> > I've tried this:
> > $this->Request->Classroom->recursive = 2;
> >
> > To just set the recursive set to 2 on the Classroom model only (Doesn't
> > work).
> >
> > I've tried doing a $this->Request->Classroom->bindModel(.)
> > Doesn't work.
> >
> > What does work is:
> > $this->Request->recursive = 2, however I get a whole recursive mess on
> the
> > other models (Eqiupment, Department). Then I have to go unbind ALL the
> other
> > stuff I don't need.
> >
> > Is there a shortcut here? I just wanna change the recursiveness on ONE
> > associated model.
> >
> > Please ask for details if I'm unclear:
> > --
> > Baz L
> > Web Development 2.0: Web Design, CakePHP,
> Javascripthttp://www.WebDevelopment2.com/
> >
>

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups "Cake 
PHP" group.
To post to this group, send email to cake-php@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---



Re: Selective Recursive Find

2007-12-10 Thread Serge Rodovnichenko

For Cake 1.2 take a look at Containable behaviour
http://www.thinkingphp.org/2007/06/14/containable-20-beta/ or Bindable
behaviour (I prefer it! :-) : http://cake-syrup.sourceforge.net/

For cake 1.1 search this group for keyword 'expects' :-)

On Dec 10, 4:24 pm, Baz <[EMAIL PROTECTED]> wrote:
> I have a simple question (I think).
>
> I have a model (Requests), which has a lot of relationships including 3
> belongsTo (Equipment, Classroom, Department).
> The Classroom model has a belongsTo (Building).
>
> I'm doing a findAll/paginate in the Request controller with
> $this->Request->recursive = 1 and get MOST of what I need. However, I'm
> trying to tack onto that, the Building reference.
>
> I've tried this:
> $this->Request->Classroom->recursive = 2;
>
> To just set the recursive set to 2 on the Classroom model only (Doesn't
> work).
>
> I've tried doing a $this->Request->Classroom->bindModel(.)
> Doesn't work.
>
> What does work is:
> $this->Request->recursive = 2, however I get a whole recursive mess on the
> other models (Eqiupment, Department). Then I have to go unbind ALL the other
> stuff I don't need.
>
> Is there a shortcut here? I just wanna change the recursiveness on ONE
> associated model.
>
> Please ask for details if I'm unclear:
> --
> Baz L
> Web Development 2.0: Web Design, CakePHP, 
> Javascripthttp://www.WebDevelopment2.com/
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups "Cake 
PHP" group.
To post to this group, send email to cake-php@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---



Selective Recursive Find

2007-12-10 Thread Baz
I have a simple question (I think).

I have a model (Requests), which has a lot of relationships including 3
belongsTo (Equipment, Classroom, Department).
The Classroom model has a belongsTo (Building).

I'm doing a findAll/paginate in the Request controller with
$this->Request->recursive = 1 and get MOST of what I need. However, I'm
trying to tack onto that, the Building reference.

I've tried this:
$this->Request->Classroom->recursive = 2;

To just set the recursive set to 2 on the Classroom model only (Doesn't
work).

I've tried doing a $this->Request->Classroom->bindModel(.)
Doesn't work.

What does work is:
$this->Request->recursive = 2, however I get a whole recursive mess on the
other models (Eqiupment, Department). Then I have to go unbind ALL the other
stuff I don't need.


Is there a shortcut here? I just wanna change the recursiveness on ONE
associated model.

Please ask for details if I'm unclear:
--
Baz L
Web Development 2.0: Web Design, CakePHP, Javascript
http://www.WebDevelopment2.com/

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups "Cake 
PHP" group.
To post to this group, send email to cake-php@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---