Re: PowerBake - bake all at once (for 1.2)

2007-11-28 Thread powtac

Good idea, thougt already of this...

--~--~-~--~~~---~--~~
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: PowerBake - bake all at once (for 1.2)

2007-11-28 Thread kiang



On 11月29日, 上午1時20分, Baz <[EMAIL PROTECTED]> wrote:
> IMO, there's no way to automatically determine relationships. You can guess,
> but how do you tell a hasOne from a hasMany? I don't think it's worth it.
> I'm as lazy as the next guy (even lazier) but I think you should at least
> take time to step through the wizard for your models.

I agreed. :)

>
> After the models are set up, the other "bake all" functions come in more
> handy. I haven't checked but, I would hope there's an overwrite all in
> there. That's one thing I don't really like. Maybe prompt me once or use a
> parameter, but I hate having to punch yes to replace files.

I don't know if it's a good idea. But you could try to disable line
421 to 432 in cake/console/libs/shell.php. You'll get the results as
you wish. :)

>
> --
> Baz L

---
kiang
--~--~-~--~~~---~--~~
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: PowerBake - bake all at once (for 1.2)

2007-11-28 Thread kiang

It's totally different since the script won't ask you that many times
as the number of tables you have. Try it and you'll find the
differences. :)

---
kiang

On 11月28日, 下午10時35分, foxmask <[EMAIL PROTECTED]> wrote:
> what does it do more than "cake bake" ?
> just the 'A' ?
--~--~-~--~~~---~--~~
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: PowerBake - bake all at once (for 1.2)

2007-11-28 Thread Baz
IMO, there's no way to automatically determine relationships. You can guess,
but how do you tell a hasOne from a hasMany? I don't think it's worth it.
I'm as lazy as the next guy (even lazier) but I think you should at least
take time to step through the wizard for your models.

After the models are set up, the other "bake all" functions come in more
handy. I haven't checked but, I would hope there's an overwrite all in
there. That's one thing I don't really like. Maybe prompt me once or use a
parameter, but I hate having to punch yes to replace files.

--
Baz L
Web Development 2.0
http://WebDevelopment2.com/

On Nov 28, 2007 8:47 AM, Chris Hartjes <[EMAIL PROTECTED]> wrote:

>
> On Nov 28, 2007 9:04 AM, kiang <[EMAIL PROTECTED]> wrote:
> >
> >
> > Known problems and limitations:
> > 1. I haven't had time to figure out how to deal with table
> > relationships automatically.
>
> Implementing that will be the deal-maker or deal-breaker.  Personally,
> I see no point in having a 'bake all' that doesn't know enough to
> automatically create the relationships.
>
> Not such an easy task.
>
> --
> Chris Hartjes
>
> My motto for 2007:  "Just build it, damnit!"
>
> @TheKeyboard - http://www.littlehart.net/atthekeyboard
>
> >
>

--~--~-~--~~~---~--~~
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: PowerBake - bake all at once (for 1.2)

2007-11-28 Thread Chris Hartjes

On Nov 28, 2007 9:04 AM, kiang <[EMAIL PROTECTED]> wrote:
>
>
> Known problems and limitations:
> 1. I haven't had time to figure out how to deal with table
> relationships automatically.

Implementing that will be the deal-maker or deal-breaker.  Personally,
I see no point in having a 'bake all' that doesn't know enough to
automatically create the relationships.

Not such an easy task.

-- 
Chris Hartjes

My motto for 2007:  "Just build it, damnit!"

@TheKeyboard - http://www.littlehart.net/atthekeyboard

--~--~-~--~~~---~--~~
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: PowerBake - bake all at once (for 1.2)

2007-11-28 Thread foxmask

what does it do more than "cake bake" ?
just the 'A' ?

On 28 nov, 15:04, kiang <[EMAIL PROTECTED]> wrote:
> Download here:http://twpug.googlecode.com/files/powerbake.php.zip
>
> 1. Download and extract the file to cake/console/libs/powerbake.php
> 2. Try to use this script as bake:
> cake.php powerbake -working /../app/
> 3. You have four options after executing the script
> M = Generating all models according to tables in your database
> C = Generating all controllers according to tables in your database
> V = Generating all views according to tables in your database
> A = Generating all above according to tables in your database at once
>
> Known problems and limitations:
> 1. I haven't had time to figure out how to deal with table
> relationships automatically.
> 2. Test this script in non-production environments, or ... or ...
>
> :)
>
> ---
> kiang
--~--~-~--~~~---~--~~
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
-~--~~~~--~~--~--~---



PowerBake - bake all at once (for 1.2)

2007-11-28 Thread kiang

Download here:
http://twpug.googlecode.com/files/powerbake.php.zip

1. Download and extract the file to cake/console/libs/powerbake.php
2. Try to use this script as bake:
cake.php powerbake -working /../app/
3. You have four options after executing the script
M = Generating all models according to tables in your database
C = Generating all controllers according to tables in your database
V = Generating all views according to tables in your database
A = Generating all above according to tables in your database at once

Known problems and limitations:
1. I haven't had time to figure out how to deal with table
relationships automatically.
2. Test this script in non-production environments, or ... or ...

:)

---
kiang
--~--~-~--~~~---~--~~
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
-~--~~~~--~~--~--~---