Actually I think you might do something like this :
in status model
var $hasAndBelongsToMany = array('Tostatus' => array('className' =>
'Status', 'joinTable' => 'status_links', 'foreignKey' => 'status_id',
'associationForeignKey' => 'to_status_id') ;
You could even create a model for your status_link (maybe to store
more informations), and use the 'with' parameters of the HABTM.
hth
On Jun 24, 10:14 am, Bo ozz <[EMAIL PROTECTED]> wrote:
> Hi,
>
> I'm trying to create a small workflow system, in which I have a table
> of available statusses a job can have. Since it is not possible to
> switch from certain statusses to another, I'm trying to create some
> logic which describes which status can lead to which.
>
> Therefor, I've made a link table that should enable the self-reference
> on status:
>
> status
> - id
> - name
>
> status_link
> - status_id
> - to_status_id
>
> The thing is, that I cannot seem to define a HABTM in the status model
> for this relation. I also tried it with hasMany, belongsTo and hasOne.
>
> Any thoughts?
>
> thanks!
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"CakePHP" 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
-~----------~----~----~----~------~----~------~--~---