hi and thanks for reading this.

for a literature database I have a database table "resources" with a
field "publisher" and a field "co-publisher". both should point to the
same table "publishers" which is a pool of names of persons and
companies. they can either be publisher or co-publisher, but should
not exist in the "pool" twice.

so far I was not able to create a valid cake model to have two
different fields in the same table point to the id of another table, i
tried various syntaxes, e.g.:

var $belongsTo = array ('Publisher' => array ('foreignKey' => array
('co_publisher_id','publisher_id')).......

var $belongsTo = array ('Publisher' => 'foreignKey' =>
('co_publisher_id', publisher_id')......

var $belongsTo = array ('Publisher' => array ('foreignKey' =>
'co_publisher_id'), 'Publisher' => array ('foreignKey' =>
'publisher_id').....

is this not possible or I am just too stupid to figure it out?
thanks and greetings,
karl.

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

Reply via email to