ok i see, then my next step should be creating models in cake for all
my tables, and building the associations into the model, thanks for
the help ;)
On Jul 23, 10:20 am, AD7six <[EMAIL PROTECTED]> wrote:
> On Jul 23, 11:00 am, rtanz <[EMAIL PROTECTED]> wrote:
>
> > Hi thanks for the advice
>
> > > If you were not planning already, any link table that has more than 2
> > >foreign keys should be a model so that you can easily manage them
>
> > So for which tables should i be creating a model apart from those that
> > have two foreign keys.
>
> Hi rtanz,
>
> Given the db structure you originally proposed all of your tables are
> models, and you have no "pure" join (habtm) tables.
>
> > > DRY - module_name -> name, module_code -> code, role_name -> name,
> > > task_name -> name, task_order -> order
>
> > Im sorry but i did not understand what DRY means, should i change
> > those names like module_name becomes name etc?
>
> DRY, don't repeat yourself. It's a suggestion/recommendation.
>
> Some of your field names include the name of the model itself. which
> means you will be accessing data as
> $aVar['Task'][' task_name']
> instead of
> $aVar['Task'][' name']
>
> and specifying your constraints as
> array(´Task.task_name' => $x)
> instead of
> array('Task.name' => $x)
>
> There are a number of benefits to doing this the most obvious one
> being less typing.
>
> hth,
>
> AD
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Cake
PHP" group.
To post to this group, send email to [email protected]
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
-~----------~----~----~----~------~----~------~--~---